Due to the sorting option in the wingrid I am looking for a way, how to get from a specific UltraGridRow object to UltraDataRow in the datasource?
Is there any mapping of indexes or any property how can I get from UltraGridRow object to the associated UltraDataRow object in the datasource?
Viktor
This was useful. Thank you
If you can find out what the index of the row is in your underlying data source, you can call the GetRowWithListIndex() method off the WinGrid's Rows collection. This is easy if you have only one band in your grid, or if you're looking for something in the root band of a hierarchical grid.
If you want to get at any rows in child bands, you have to get the list index of all the parent rows from the row you want, and then get each grid row from the root band down to reach the grid row you want. You'll have to determine the list index of your row's parent in its data source, then its parent, all the way up to find the index in the root of the data source. You can then find the corresponding WinGrid row off the grid's Rows collections, look at the appropriate ChildBand from that row, and use its Rows collection to continue back down the "chain" of indexes until you get the row you want.
You can use the ListObject property of the UltraGridRow to get the row from the underlying data source.