I have a grid with a templatecolumn which holds a checkbox. I'm using a templatecolumn because I don't have any properties on my binded object to use and I'm getting the rules for the checkbox outside the binded object.
I have already resolved how to get data for the row whenever user clicks the checkbox but now I need to check the checkboxes based on the outside rules. I've done this so far that I have the row where I need to check the checkbox but how can I get the checkbox control from the row? Like I said the checkbox is in a templatecolumn.
Any ideas?
I've taken another approach with this. I used my own column instead of TemplateColumn and created my own ContentProvider. With this I can command the checkbox there is still one problem.
I'm using a list of selected values to check if the item is selected (= checkbox is checked). How can I pass that list to the custom ContentProvider? I need some access to that list object.
Hi,
There isn't a need to create your own column. Instead simply use a binding on the checkbox to your data object, and use a valueconverter to manipulate the data to get your value.
<DataTemplate><CheckBox IsChecked="{Binding Converter={StaticResource myConverter}}"/>
</DataTemplate>
-SteveZ