I am trying to do drag and drop within the same grid. I have a hierarchical DataSet so my grid has several Bands. When I move rows within the same band everything is working fine. But if I want to move row from one band to another - it is not working and row remains at the same place. Actually I think it is trying to drop withing a band causerow sometime moves withing the band.
I am using the following code:
private void ultraGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e)
ultraGrid1.AllowDrop = true; e.Layout.Override.SelectTypeRow = SelectType.ExtendedAutoDrag; e.Layout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.True; e.Layout.Override.CellClickAction = CellClickAction.RowSelect;
private void ultraGrid1_DragDrop(object sender, DragEventArgs e)
aRow.ParentCollection.Move(aRow, dropIndex); // cause I am not moving upper level rows
The Move method just re-orders the rows in the same collection. It has no effect on the underlying data source.
Moving a row to a different band would require you to modify the data source.