Nodes and Sorting

What is the best way to sort a grid when it contains nodes?

Is there a way to keep together all the rows that belong to a node after performing a sort (e.i. QSort)?
After sorting, rows are arrange correctly. However, nodes are broken and the expand/collapse button does not make sense. 

Sincerely,

Roberto 

If you use grouping, you can use QSortGroup() to perform sorting within the groups.

Thank you Bruno. Unfortunately, I don't think grouping will work in my situation as only a few set of rows out of 400 need to be grouped. That is why I opted to use Nodes.


Best regards,

Roberto

If you have just nodes without grouping, you could perform a sort on the rows within a node using grid.QuickSort(ColumnIndex, FromRow, ToRow) and do this for all nodes where you want to have the rows sorted.