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?
Never Mind. I just found solution in very next search. I had to access the ListObject property of UltraGridRow.
https://ko.infragistics.com/community/forums/t/47522.aspx
I can use this work-around for my implentation but i see this is very old post and wanted to see if there is a better way now.
I am populating UltraDataSource from business objects and i am setting the tag property for UltraDataRow that i am adding to UltraDataSource. However, the tag property is not being set in UltraGridRow collection.I am checking it in InitializeRow event of UltraGrid and see that the Tag is null. How do i find the corresponding ultradatasource row for the grid row?
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,
kel
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.