This is a migrated thread and some comments may be shown as answers.

Update Summary Data when Checkbox column item changes

2 Answers 74 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Shaun
Top achievements
Rank 1
Shaun asked on 22 Mar 2013, 01:50 AM
Hi,

I have a Gridview with a checkbox column and a value column.
I also have 2 summary rows, one to counts the number of checked items and one to count the number of unchecked items.

Is it possilbe to update the summary values when a checkbox column item is changed?

Just now the summary row is updated then I select another row, buy can I do it on OnClck event?

Cheers

Shaun.

2 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 26 Mar 2013, 03:27 PM
Hello Shaun,

Thank you for writing.

To force a check box cell to submit its value upon change, you should use the ValueChanged event of the grid:
void radGridView1_ValueChanged(object sender, EventArgs e)
{
    if (radGridView1.CurrentColumn is GridViewCheckBoxColumn)
    {
        radGridView1.EndEdit();
    }
}

I hope this helps.
 

Regards,
Stefan
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
0
Shaun
Top achievements
Rank 1
answered on 26 Mar 2013, 07:34 PM
Hi Stefan,

Thanks for that, works a treat.

Cheers
Shaun.
Tags
GridView
Asked by
Shaun
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Shaun
Top achievements
Rank 1
Share this question
or