Search code examples
apache-flexdrag-and-dropadvanceddatagrid

Drag and drop onto Flex AdvancedDataGrid


How do I determine which Flex AdvancedDataGrid cell - row and column index - I've just dropped onto? calculateDropIndex seems to give me the row, but how do I get the column?


Solution

  • It is going to be a pseudo code:

    on drop:
     get x coordinate local to that grid when dropped
     loop over visible grid columns while adding their widths
     stop when total widths is greater than x coord
    

    and there should be your column.

    Does that help?