I have GridView with several columns:
number 1 Checkbox (called "Select all")
number 2 test line
number 3 Checkbox
number 4 Checkbox
What i want to do is once the Checkbox from the first column is selected so i want automatic select Checkbox number 3 and 4 (all the checkbox inside the row except the first of curse...)
so this is what i have try:
private void radGridView1_RowFormatting(object sender, RowFormattingEventArgs e)
{
if ((bool)e.RowElement.RowInfo.Cells["Select"].Value)
{
e.RowElement.RowInfo.Cells["First Name"].Value = true;
e.RowElement.RowInfo.Cells["Second Name"].Value = true;
}
else
{
e.RowElement.RowInfo.Cells["First Name"].Value = false;
e.RowElement.RowInfo.Cells["Second Name"].Value = false;
}
}
the only problem that i have is once selected the first checkbox of several rows and all checkbox selected is i want to deselect specific checkbox this also select \ deselect other rows checkbox
number 1 Checkbox (called "Select all")
number 2 test line
number 3 Checkbox
number 4 Checkbox
What i want to do is once the Checkbox from the first column is selected so i want automatic select Checkbox number 3 and 4 (all the checkbox inside the row except the first of curse...)
so this is what i have try:
private void radGridView1_RowFormatting(object sender, RowFormattingEventArgs e)
{
if ((bool)e.RowElement.RowInfo.Cells["Select"].Value)
{
e.RowElement.RowInfo.Cells["First Name"].Value = true;
e.RowElement.RowInfo.Cells["Second Name"].Value = true;
}
else
{
e.RowElement.RowInfo.Cells["First Name"].Value = false;
e.RowElement.RowInfo.Cells["Second Name"].Value = false;
}
}
the only problem that i have is once selected the first checkbox of several rows and all checkbox selected is i want to deselect specific checkbox this also select \ deselect other rows checkbox