I have a gridview with cells bound to a datasource. In addition I added a checkboxcolumn as follows:
I want this grid not editable, only the checkbox.
I made the following code snippet:
void radGVMeldinger_CellClick(object sender, GridViewCellEventArgs e)
if (e.RowIndex >= 0)
if (this.radGVMeldinger.MasterGridViewTemplate.Rows[e.RowIndex].Cells.Value.ToString() != "True")
Everything works fine, unless the fact that when I click the checkbox column this event doesn't fire.
This event fires when I click on every other column.
Has anyone a solution?
14 Answers, 1 is accepted
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
I need to know if on my grid I have some line checked but I can't.
I try using a timer (!!!!) to count the checked lines every second, and I see that if I stay on the checked line it's counted as not checked... I need to move on another line to see the change!!
The ValueChanged event will fire every time you change the value in a cell, but that value will not be applied in the cell until you move from that cell, because it is waiting for confirmation, you could always cancel the operation, or change the value.
That's why when you move out of that cell, and the value has been changed, the CellValueChanged event will fire, and the value will be changed.
You can change this behavior by registering to the ValueChanged event and using this:
I will also attach a full example in the following lines, if you need it:
Hope this helps, if you have any other questions or comments, please let me know,
Thank you very much!
I have the same problem. I have a radgridview that will autofilled by datasource from database. one of the column in binary so it will automatically creates a checkbox column. My requirement is to switch between select and deselect of the checkbox if user clicks on any part of that row. I am able to capture the cellclick event when users click anywhere on the row except the checkbox cell. I would like to know how can I capture cellclick event when user clicks on a checkbox cell.
Thanks in advance!
I did not manage to reproduce the issue with the latest release Q3 2012 SP1. The CellClick event is fired when the checkbox editor is clicked. Could you share more information regarding the version that you are using and how you initialize and use RadGridView?Greetings,
the Telerik team
I think I am using Q1 2012 SP1. I am initializing the Radgridview by executing a storedprocedure and assinging result as datasource. I am not having any pre added columns to the radgriedview.
One of the columns in the result set is binary which automatically converted to checkbox column on Radgridview after binding. I am trying to check and uncheck the checkbox based on cellclick event, but auto genereated Checkbox column is not responding to the cellclick event. I think I need to use the latest release.
Thank you for writing.
I did not manage to reproduce the issue with 2012.1.321.40 (Q1 2012 SP1). It seems that there is something specific that I am missing. Could you send a sample project where the issue occurs? This will help us to understand your scenario from first hand.
the Telerik team
I'm using the EndEdit()-Method with my CheckBox.
But there is one issue:
If I clicked the same cell/CheckBox, I got an error: ASSERT - Trying to update row outside a transaction!
Can you please help me :)
Thank you for writing.
We haven't had similar reports for RadGridView from other customers. Instead of calling EndUpdate for the grid, I would recommend you to set the GridViewCheckBoxColumn.EditMode property to OnValueChange. Thus, the editor of the GridViewCheckBoxColumn won't be activated and the value will be immediately submitted to the cell.
If you are still experiencing any further difficulties, feel free to submit a support ticket providing a sample project demonstrating the problem. Thus, our support staff will gladly assist you.
I hope this information helps. Should you have further questions I would be glad to help.
thank you, changing the EditMode to OnValueChange works fine.
But I have still the same problem with the ASSERT-issue when I'm clicking the same checkbox a second time, without changing the row.
I'm using ProBindingSource.
Thank you for writing back.
It seems that you use RadGridView in an OpenEdge environment. Please note that for OpenEdge related topics the preferred places to submit a technical question are Salesforce and the Progress Community. You can log in to these websites straight from your Progress account: https://progresslink.progress.com/supportlink.
In case the issue persists please open a case in Salesforce and send us your project so that we can test it locally.
I hope this helps. Let me know if you have other questions.
I have a similar problem. I have set the editmode of the column to onvaluechange and now the CellValueChanged event fires as soon as the checkbox is checked. However what I want to do is
1. When the checkbox is ticked, do some validation
2. If the validation fails, untick the messagebox and have this take effect immediately, without the user having to exit the cell.
Part 1 is working fine, but if I set the cell's value to false in the CellValueChanged event, it doesn't untick the checkbox until the user exits the cell. And if I try using the CellValidating event, it doesn't fire until the user exits the cell.
How can I do part 2?
Note that the CellValueChanged event is fired after the cell's value has been changed. The CellValidating event is raised by RadGridView when the current cell changes or when the cell loses input focus (when pressing Enter key). If the same cell is still focused, the CellValidating event is not appropriate for this case.
You can handle the GridCheckBoxCellElement.Editor.ValueChanging event in order to control whether the value will be changed or not. Please refer to the following code snippet:
I hope this information helps.
Dess | Tech Support Engineer, Sr.