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

CellClick event does not activate the checkbox

1 Answer 27 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Mihai
Top achievements
Rank 1
Mihai asked on 23 Aug 2020, 01:24 PM

I have a RadGridView with several columns: 1st is a checkbox, 2,3,4 contain some strings.

If I want to select a checkbox and I click on the first column, the CellClick event is fired but there's something I don't understand.

When the first CellClick event is fired, the Checkbox does not get activated. When I click again on the checkbox, only then it is activated but for some reason it goes out of sync with my code. When the UI shows it is activated, the code says that nothing is selected and viceversa.

How should I properly do a selection of multiple checkboxes which trigger from the first click?

1 Answer, 1 is accepted

Sort by
0
Nadya
Telerik team
answered on 26 Aug 2020, 12:43 PM

Hello, Mihai,

GridViewCheckBoxColumn offers the EditMode property which controls when the value of the editor will be submitted to the cell. By default, the current behavior is kept (OnValidate) and the value will be submitted only when the current cell changes or the grid loses focus. The new value (OnValueChange) will submit the value immediately after the editor value changes. Feel free to change the EditMode to OnValueChange.

Additional information is available here: https://docs.telerik.com/devtools/winforms/controls/gridview/columns/column-types/gridviewcheckboxcolumn

However, I created a test project and it seems that CellClick event fires correctly and the checkbox state has changed any time I click on it. Could you please refer to the attached project and see how it works.

Let me know if you have additional questions.

Regards,
Nadya
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Mihai
Top achievements
Rank 1
Answers by
Nadya
Telerik team
Share this question
or