Hi,
Is there an event or a virtual method in XamGrid that I can override in to check when a row has been added to the grid. I'm not referring to the newly added/adding rows, but those rows that get materialized when you set the Itemssource for the grid when the grid loads for example. The idea is that I need to some cell's control when that control has been loaded already. Something similar with InitializeRow, but in there, e.Row.Cells[0].Control == null. I need an event similar to this, but a bit later when the cell.Control != null. Is there a way to get there?
Hi Alin,
Sounds like you want to use the CellControlAttached event, which fires everytime a Control is attached to a cell or when the cell's value is changed when a control is already attached to that cell.
Out of curiosity, what exactly are you trying to do? As there might be a better way to achieve your functionality via ValueConverters and bindings.
-SteveZ
Thanks for your answer Steve.
I'm trying to add some very customized tooltips (my tooltips XAML are defined somewhere else) and also I'm using custom controls in the grid's cell inheriting TemplatedColumn and ColumnContentProviderBase.
Now in my ColumnContentProvider class I overridden ResolveEditorControl and ResolveDisplayControl and I was thinking to add to add tooltips to my custom control in one of these methods where I instanciate the control itself. But I need somehow to access the data of the current row/cell. The problem with this aproach was that these methods are not being called each time a row itself is added but rather on 'column adding'. I need somehow to get to the data object when it's created with the cell and its content itself so I can set its tooltip. Do you see another aproach?
Thanks.