I am working on WPF windows application i need a help to solve some problem in it.
I have a data gridview here is a XML Code:
I want to check DataGridCheckBoxColumn CheckBox is true or false in loop
my lope is this to read a Column Velue when user click on button here is a code:
for (int i = 0; i < MyDataGrid.Items.Count - 1; i++)
{
for (int j = 0; j < MyDataGrid.Columns.Count; i++)
{
string Massage = (MyDataGrid.Items[i] as DataRowView).Row.ItemArray[3].ToString();
MessageBox.Show( Massage);
}
}
i want to check CheckBox is true or false in the loop to get velue of that row Columns where is CheckBox is checked i hope some buddy help me
to compete my code which i have done give up. i want this code work when user click on button because i have to save record with this loop in database
where CheckBox is true in MyDataGrid.
Thank you hope some buddy help me in it...
Ruchi HPosted Jul 23, 2013, 4:54 AM
You can use ValueConverter to convert back the values from checkbox as True or False.