Home Forums WinForms controls Xceed Grid for WinForms Moving rows in detailgrid Reply To: Moving rows in detailgrid

User (Old forums)
Member
Post count: 23064

Moving rows right into the data source makes it difficult to find the right row, and the only solution we see is to go through the whole grid to find it.

One solution would be to use the grid to move the row.

For example, for a MoveUp, you could find the ParentGrid.ParentDataRow, get the row above this one, and set the foreign key value of the row to be moved to the value of the above row. This way, the grid will move the row into the right detail grid, and you will be able to select it again.

Another solution would be to store the cell values into a buffer, delete the row, and add a new row in the detail grid you want, set its values, then select it.

Imported from legacy forums. Posted by André (had 2940 views)