Hi
Say I have an observablecollection with a few thousand items in it. This is then set as the itemsource of the xamWebGrid. If something changes in the code behind to one of the items, and that requires that a different style is applied to the row in the grid that displays that item, then what is the fastest way to establish which row in the grid corresponds to the item that has changed so I can apply a style to it? To do a foreach on the rowcollection is taking a long time.
Hope that makes sense.
Thanks
Kevin
Hey Kevin,
Yes, there is a very simple way to do this. We provide an event called CellControlAttached. This event fires whenever a cell comes into view, and also whenever its underlying data changes (Note the data needs implement INotifyPropertyChanged in order for that to occur).
In this event, you can update the styles of the Cells/ Rows based on their values. And you don't need to worry about traversing all the data, b/c you only need to care about what's currently in view.
Hope this helps.
-SteveZ
Hello, Did you can give me a sample in vb of this event ?
I don't find sample in the Help .
Thank you
Alex
Hi Alex,
What do you need a sample of?
Hooking up the event?
Hi SteveZ, I need a sample of CellControlAttached in vb because I don't know use.
Thank you.
See my reply here:http://community.infragistics.com/forums/t/49484.aspx