ADAdministrator Syncfusion Team February 17, 2005 04:53 AM
Not really. Moving records in a DataTable is not something that can be done.
You can use a DataView and have a specicial column with a special sort order that allows the rows to be displayed in a different order. Here is a KB discussing how you can move rows in such a manner.
It does it by clicking buttons. If you want to support D&D, then you would have to add that type of interface onto this row moving fucntionality. To get the UI to show moving rows, you can do:
this.gridDataBoundGrid1.Model.Options.AllowDragSelectedRows = true;
this.gridDataBoundGrid1.Model.RowsMoved += new GridRangeMovedEventHandler(Model_RowsMoved);
This will let you user mouse down on a row header to select it, and then mousedown a second time to drag it. In the event handler, Model_RowsMoved, you would need to use the dataview technique to reorder the rows.