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

Row client multi select

1 Answer 57 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Contra
Top achievements
Rank 1
Contra asked on 06 Sep 2010, 04:35 PM
Hi Telerik people

I just noticed that when selecting rows, either by ctrl+clicking or by selecting checkboxes in the GridClientSelectColumn, that the draggedItems will be in that order you clicked on them. If you click second, third, first. the draggedItems-array will be just that (also you can see the items while dragging they are in the order you clicked on them).

Is this a bug, or is it working as intended?

If this is the way it is supposed to work, how do I get the items to stay in the order that they are in the grid (first, second, third is selected, draggedItems stays in that order, and not the order you click on them)?

1 Answer, 1 is accepted

Sort by
0
Contra
Top achievements
Rank 1
answered on 06 Sep 2010, 05:18 PM
Came up with a solution for the wrong order problem:
var draggedItems = e.DraggedItems.OrderBy(n => n.GetDataKeyValue("Position")).ToArray(); //where "Position" is my index-column
Then used draggedItems instead of e.DraggedItems.
Tags
Grid
Asked by
Contra
Top achievements
Rank 1
Answers by
Contra
Top achievements
Rank 1
Share this question
or