Click here to Skip to main content
15,923,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
Am new to WPF. Am using a DataGrid, which populates data from the database. I have also included a DataGridCheckBoxColumn for the checkbox. Now i want the checked value of the checkbox. How can i know that, the checkbox is checked or not. If the corresponding checkbox is checked then, i want to make changes to my database.Can you please suggest a solution.

Thanks & regards
raj_arenem
Posted
Updated 26-Mar-13 18:16pm
v2

1 solution

If you're going to follow MVVM, one solution is to wrap your DB objects(dataset/table) into a model, wrap the model to a viewmodel and bind an observable collection of that viewmodel to the ItemsSource of the grid. Then once you change the value of that check box, you can catch it in the setter of the property where you bind the text box, from there you can update the model, down to the database.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900