I am writing my first WPF app and ran into a problem I need help with. I have a XamDataGrid with embedded checkboxes which display field names a user can select to search on. The problem is when they change the datasource(combobox displays different tables to search on) all of the checkboxes remain checked except one. Is there a way to cycle through the checkboxes to unchecked them everytime a user selects a new search object? Thanks for the help
Are these checkboxes in the LabelPresenters (next to the names of the fields) or somewhere else?
If they are in the LabelPresenter, you might have to iterate through all of them and check/uncheck them manually.
You can find how to iterate through the labelpresenters here:
You can also consider binding the IsChecked property to some boolean flag (dependency property), which will reset the values.
Thanks for the response. That solved my problem. The checkboxes are in the LabelPresenter