Hello Roberto Wenzel,
Thank you for the question.
I am not quite sure about the errors you are getting. However, it is not recommended to set properties for the appearance of the cells outside the CellFormatting event handler. If you want to set Me.gvMessages.GridElement.CurrentCell.BackColor = Color.Azure
in your method,
you should first check if CurrentCell is not null
, but generally the BackColor property should be set only in the CellFormatting event handler, using e.CellElement which surely is not null
I have prepared a sample project with a similar to your implementation which demonstrates the correct behavior. Please note that this approach can show only one result (the first or the last), because only one column/row can be current at a time.
My second project implements another approach, which puts a custom back color to all the cells of interest.
If you have additional questions, feel free to contact me.
the Telerik team
Check out Telerik Trainer
, the state of the art learning tool for Telerik products.