Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
Drag&Drop in Hierarchical grid
posted

I found an article to implement Drag&Drop with an UltraWinGrid.
However, I can't get it to work with an hierarchical grid. The drag&drop works in the parent band, but it doesn't when I try to change a childrow from position.

grid.Rows.Move(aRow, dropIndex);

This doesn't seem to do anything...

Parents
No Data
Reply
  • 17259
    Verified Answer
    Offline posted

    grid.Rows are the rows only in the first band. To get a collection of all rows you need to use

    grid.Rows.GetRowEnumerator(GridRowType.DataRow, null, null);

    but you don't need that since you can write:

    aRow.ParentCollection.Move(aRow, dropIndex);

Children