This is a migrated thread and some comments may be shown as answers.

[Solved] GroupIndex not updated when performing drag drop within group

1 Answer 137 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Malcolm Cooper
Top achievements
Rank 1
Malcolm Cooper asked on 12 Jan 2010, 02:09 PM
I have a grid which has grouping.  I need to be able to drag and drop (reorder) within a group and between groups. While stepping through the code I can see that the Destination ItemIndex is update, but not the the Destination GroupIndex.  I need to know where within the group I am dropping the record so that it can be updated correctly in the database.  Is there anyway to do this without using the ItemIndex and looping through the recordset to find the index within a group?

Thanks,
Malcolm

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 15 Jan 2010, 08:16 AM
Hello Malcolm,

You can use the (e.DestDataItem as GridDataItem), to locate the item where the dragged items are dropped. You can get the ItemIndex, or the key field of the record, to determine where the item is being dragged, in the RowDrop event handler. Based on this, you can determine where in the database to move the item.

Best wishes,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Malcolm Cooper
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or