Datagrid checkbox binding issue
I have bound the datagrid checkbox column with the property of the dataobject. The value of the property for example is Land,Sea ,Air etc. I need to set the checkbox to checked if it is land. How do I do it. My current code is as follows
Ranjit MenonPosted Apr 8, 2014, 1:07 PM
Shweta LodhaPosted Apr 8, 2014, 12:55 PM
In your are using MVVM then in ViewModel class, you can create a property(named IsCheck) and that property will be bind to IsChecked. Sample code can be as:
if(Vehicle.Environment == "Land")
IsChecked=true;
If you are not using MVVM, then you can do all this in code-behind also.