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
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Shweta LodhaRank #31 · 39.8K reputationPosted Apr 8, 2014, 8:55 AM EDT
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.
Ranjit Menon7 reputationPosted Apr 8, 2014, 9:07 AM EDT