I need to implement a functionality in the grid to allow the modification of a cell style (background color and tooltip) from information contained in a structure of type Dictionary <string, objects> where string is the Column.UniqueName and objet is an object that indicates the background color and tooltip message.
If I assign a class that implements IValueConverter cell style from the XAML, I get the object value with the value of the cell, but I have no access to the "object" with color and message.
If implemented in the event CellEditEnded (because the dictionary is filled after validating the value of another cell, being edited), I get retrieve rows selected cells but as a GridViewRow, and only allows access to columns currently visible. If I disable the virtualization grid, as have a large number of rows becomes impossible to use as it freezes.
What I can do?
Thank you very much.
0
Vlad
Telerik team
answered on 18 Apr 2013, 07:15 AM
Hi,
You can use CellStyleSelector to achieve your goal. In SelectStyle method of your selector you have access to entire data item and the style returned from the selector will work normally with grid horizontal virtualization (will be applied to the newly created cells once loaded when you scroll).
Please check your local copy of our WPF demos for more info and code!