I've looked at the documentation for the GridDataControl and I've not seen any examples where the conditional formatting can be turned off or on.
I have a GridDataControl with records that are colored differently based on the values in a column. I want to put a checkbox outside the grid that can control whether or not the coloring is applied at all. Unfortunately the GridDataConditionalFormat does not have an "IsEnabled" property that I could bind to my checkbox. Another idea I had was adding a second GridDataCondition to the GridDataConditionalFormat and using a predicate "AND" but it seems like I have to specify a ColumnName for the GridDataCondition and cannot use the checkbox's value in this second GridDataCondition.
Does anyone know of a way to toggle the conditional formatting or use a property external to the GDC in a GridDataCondition?
SMSaravanan M Syncfusion Team January 14, 2015 01:53 PM UTC
Thanks for contacting Syncfusion support,
We have analyzed your query. You could not Enable or Disable the GridDataConditionalFormat by using IsEnable property because since this property not available in GridDataConditionalFormat . But you can achieve your requirement like binding the CheckBox by interaction behavior with custom Dependency Property. Here we have bind the custom dependency property to IsChecked property of CheckBox. We have applied the conditional formatting to GridDataControl based on checkbox value in DependencyPropertyChangedCallBack method. Please refer the below code snippet.