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

Checkbox Event Quection

1 Answer 50 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 16 Dec 2011, 01:16 AM
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!!

1 Answer, 1 is accepted

Sort by
0
Ivan Petrov
Telerik team
answered on 20 Dec 2011, 05:05 PM
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.
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Nick
Top achievements
Rank 1
Answers by
Ivan Petrov
Telerik team
Share this question
or