Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Buttons, RadioButton, CheckBox, etc > Checkbox Event Quection

Not answered Checkbox Event Quection

Feed from this thread
  • Nick avatar

    Posted on Dec 15, 2011 (permalink)

    Hello Guys,

            private void radGridViewTakeSomeData_CellValueChanged(object sender, GridViewCellEventArgs e)
            {
                bool isChecked = (bool)e.Row.Cells[4].Value;
                if (isChecked == true)
                {
                                //Do something....
                }
            }

    When I check GridViewCheckBoxColumn , the event acts the moment I click somewhere else in the grid. Should I change the event I'm using or is any "End Edit Mode" property in order to act immediately after I tick the Checkbox??

    Thanks in advance!!

    Reply

  • Ivan Petrov Ivan Petrov admin's avatar

    Posted on Dec 20, 2011 (permalink)

    Hello Nick,

    Thank you for writing.

    To force the change of the cell value immediately after you click the check mark, you can add the following event handler for the RadGridView MouseDown event to your code:

    private void radGridView1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
    {
      RadCheckmark checkmark = this.radGridView1.ElementTree.GetElementAtPoint(e.Location) as RadCheckmark;
      if (checkmark != null)
      {
        this.radGridView1.EndEdit();
      }   
    }

    I hope this will help you.

    Please note that we are still expecting an answer from you on the questions asked in your thread "RibbonBar & Forms". This will allow us to continue supporting your enquiries.

    Greetings,
    Ivan Petrov
    the Telerik team

    Q3’11
    of RadControls for WinForms is available for download (see what's new). Get it today.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Buttons, RadioButton, CheckBox, etc > Checkbox Event Quection
Related resources for "Checkbox Event Quection"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]