Is it really necessary to create a IValueConverter for each field attribute that you might want to customize on the grid? Is there a way to get a
row or column at load time, interrogate the data and customize the field attributes/settings of that row including events based on the content of the row data?
I want to determine multiple attributes on a field based on the individuals rows content.
For example disable the field if a value of the row is empty. Set the background color and perhaps the value of text in a column if a rows data is set a particular way.
thanks - paul
Hello Paul,
I am just checking if you require any further assistance on the matter.
Sincerely,
Krasimir, MCPD
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support
Thank you for your post. I have been looking into the question that you are having and if I understand correctly, you wish to implement conditional formatting on the cells of the XamDataGrid, without using converter. You can do that for some of the scenarios, by using DataTriggers in the style for the CellValuePresenter. When you have a condition that should color the cell in a particular color, when it contains a specific value, you can add the DataTrigger and avoid using converter. If you wish to implement a condition that is for example, if value is bigger than 10, then color the cell in red, then you will need to use a Binding to the Background of the CellValuePresenter and add a converter, which should contains the logic for the color change.
I have created a sample application for you, that shows how you can use a DataTrigger to disable a cell if its value is null and to color the whole row if particular cell has specific value.
Please let me know if you need any further assistance on the matter.