开发者

Drag and drop question in flex datagrid

I am performing a drag and drop between 2 datagrids where one item could replace/merge with another item based on some processing. for this, I need to know about ce开发者_StackOverflow中文版rtain events:

  1. Which event will give me information about the cell in which I am going to drop a item.
  2. How could I cancel the dragged operation if I know that the my drag was invalid for a particular condition.

Thanks guys...


1) Use myDatagrid.calculateDropIndex(DropEvent) to figure out the index of the datagrid where the person is dropping the object. You'll probably do this on the dragDrop event on your datagrid.

2) This is easy, on your dragDrop event handler, do a check against the data source bound to your DataGrid for whatever condition you are looking for. If the condition to not allow is met, simply don't do any logic on your data source.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜