0
votes

I have a problem with extjs gridpanel dragdrop.

the scenario is as follows: The gridpanel is initially rendered by loading a remote store. Then, the rows are added, updated dynamically. Drag drop feature is implemented on "render" event of gridpanel. Drag drop works fine for the originally retrieved rows from the remote store. but when i try to use drag drop for the newly added or edited rows, it doesn't work.

I am getting the following error on firebug: Index or size is negative or greater than the allowed amount" code: "1

This is may be because , the newly added rows are not taken as a part of the store . I tried changing the event to "click" but it doesnt work that way..

Please please suggest a solution for this fast.. Its needed urgently.

Thanks, Shreya.

1

1 Answers

0
votes

I know 2 methods for drag and drop in ext, one of them is only for grid rows, the other one that I'm using is with setting dragzones and dropzones. With that method, the only thing you have to do is catch an event which is fired when you add new rows to the grid. In that event, set every new row to be a dragzone (so it can be dragged). That's what I did in a similar situation. Hope this helps..

By the way grid rows don't have a .el (DOM element attached to the Ext component, which is the row in this case). So you'll have to create a div for each row component and then use the initializeDropZone(row[x]), where row[x] is the new added row.