I am trying to find a way to get the UltraGridRow in the UltraWinGrid control that is related to my UltraDataRow in the UltraWinDataSource. So far, I have not been successful. Does anyone know how to do this?
Hi,
I got an idea - and I've been using this in my application for a while now. Try assigning a unique object to the Tag property of the DataRow; then if you have a specific GridRow selected, you can just retreive that object from the Row's Tag object and determine if they are the same. This way, there is a 1-to-1 relationship between DataRow and GridRow. The drawback is that you'll have to synchronize lock your datasource when iterating through each row.
kel
This is pretty close to what I actually did to get the gridrow that I needed. What I did was set the tag property of the DataRow to the GridRow. Then, when the CellDataRequested event fired for the data source, I was able to see which grid row the data row was associated with.
hi,
I forgot to mention, you might also try using UltraGrid.ActiveRow.ListObject and UltraGrid.ActiveRow.ListIndex properties.
These two properties will essentially give you the corresponding IList object, the the IList inedex - to which your UltraGridRow is bound to.
br,