Update Summary Data when Checkbox column item changes

3 posts, 0 answers
  1. Shaun
    Shaun avatar
    39 posts
    Member since:
    Sep 2012

    Posted 21 Mar 2013 Link to this post

    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. Stefan
    Admin
    Stefan avatar
    2911 posts

    Posted 26 Mar 2013 Link to this post

    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.
  3. Shaun
    Shaun avatar
    39 posts
    Member since:
    Sep 2012

    Posted 26 Mar 2013 Link to this post

    Hi Stefan,

    Thanks for that, works a treat.

    Cheers
    Shaun.
Back to Top