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

Reorder Rows in current Grid Version

1 Answer 108 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sebastian
Top achievements
Rank 1
Sebastian asked on 17 Aug 2011, 03:27 PM
Hi!

I am using a current build of the grid view (2011.2.0808.40) and I am trying to enable drag & drop reordering of rows.

I found some examples in this board, however the examples don't compile against the current Version. For example

RadItemsControl itemsControl = this.gridView.ItemsControl;
this.currentDropIndex = itemsControl.Records.IndexOf(row.Record);

fails to compile because RadItemsControl and the ItemsControl Properties don't exist.

I tried to replace the code with
this.currentDropIndex = gridView.Items.IndexOf(row.Item);

however the event handler row.MouseUp += this.RowMouseUp; is not invoked when releasing the mouse button.

Only the drag&drop indicator shows up.

I think the code is the one from this thread:
http://www.telerik.com/community/forums/wpf/gridview/row-drag-drop-re-ordering.aspx

An other problem is when dragging a row with extended selection mode enabled all rows I cross with my mouse while dragging are selected.

1 Answer, 1 is accepted

Sort by
0
Accepted
Vera
Telerik team
answered on 18 Aug 2011, 01:19 PM
Hi Sebastian Breitzke,

The source you are using is a bit outdated. Here is an example of how to enable reordering of rows in the grid. This is the silverlight demo. You can download and run the WPF Controls demo locally.

Kind regards,
Vera
the Telerik team
Tags
GridView
Asked by
Sebastian
Top achievements
Rank 1
Answers by
Vera
Telerik team
Share this question
or