I have a dashboard using an ultragrid bound to a datatable that is updated at runtime by a process. The grid displays the updated informatoin as it is bounded to the datatable.
Now I want to format the cell colour and font of the updated cell but can't seem to find the event relating to this. There is no user input so I cannot use the stock events
Okay I found the initializeRow event to do the trick. However I cannot find out which cell has changed. Any ideas?
Hello Adeyinka,
Thank you for posting in our forum.
If I understand you correctly you need to determine when the data in the DataTable was changed by the back end data base. Please note, the grid does not deal with the data base directly. It is only deal with the local data source, e.g. DataTable in your case. So there is no event in the grid which may fire when the back end data base changes some data in the DataTable. So you need to track the changes in the DataTable and not in the grid. You may use RowChanging or ColumnCnahging events of the DataTable class for this.
Please let me know if you need any additional information.
Thank you for using Infragistics Controls.
What i need is to be notify when data in a cell has changed. When the datatable is updated, the grid update automatically due to binding but the only event that fires is InitializeRow and this has no infotmation on the column or cell that has changed. There is no user intervention in my application as it is a display board.
I have worked around this by tracking column changed in the datatable and passing the column to the e.row(ChangeColumn) of the InitializeRow so it knows which cell to format. This isn's ideal as I have to filter out other triggers of this event and i believe it is very costly on resources.
I also cannot see any events called RowChanging or ColumnChanging.
Hi,
Thank you for the reply.
InitializeRow is the only event that fires if a value in the underlying data source has changed. The other events related to updating the data in the grid, like BeforeRowInsert, CellChanged, etc., are fired only if the interaction happens through the grid, not through the data source. So in order to achieve your requirement you will have to use the IntializeRow event and in order to know which cell was changed you need to track it through the underlying data source. For this you can use the ColumnChanging event of the DataTable bound to the grid. In that case you will need to filter only the changes you need to reflect in the actual grid, but as for performance, I don’t believe it will be that taxing as this is simply an additional event.
Please let me know if you have any additional questions.