http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx
Can this be fixed? The other controls on the grid can be directly clicked to turn editable so its not intuitive at all for end users.
Thanks
10 Answers, 1 is accepted
I am sorry to say but this behavior is not controlled by the RadGrid and can not be fixed. The problem is caused by the fact that the check boxes are disabled and mouse events are not fired for disabled elements(as you can see from this discussion). This prevents the control from opening the respective cell/row for edit. The only way the cell/row can be opened for edit is to click on the non disabled part of the cell.
Regards,
Angel Petrov
Telerik
The default behavior of the GridCheckBoxColumn is to set the check box as disabled when the item is not in edit mode. If you want to have an enabled check box I would recommend using a template column with check boxes in both the ItemTemplate and EditItemTemplate.
Regards,
Angel Petrov
Telerik
Changing the column behavior is not desirable as this will cause a breaking change and will certainly affect other clients logic. That said I would suggest integrating the template column solution in order to achieve the desired result.
Regards,
Angel Petrov
Telerik
I agree with the other developers here, are you building these controls for everyone or just a few select clients that you don't want to upset with a breaking change?
Although I don't understand why this has to be a breaking change, just add another property that gives us the option to NOT have it default to disabled ... heck you already have a ReadOnly property that is effectively meaningless in this case.
I've seen Telerik respond frequently with the same "breaking change will affect other clients" ... that's kinda cop-out, we're all developers we know what you can do if you wanted to do it. Sorry if I'm sounding frustrated with Telerik but you consistently demonstrated an odd pattern of make our lives more complex and your lives easier ... that's not why we buy yearly subscriptions to Telerik. Telerik is supposed to be making things easier.
Cheers, Rob.
Thank you for sharing your experience.
I want to assure you that the desire to avoid breaking changes has a solid basis in the way business operates. People want to never have to change a single line of code when upgrading, and we must respect that.
The problem with adding properties is that they make things difficult to control and configure, and the more properties you have, the more scenarios and combinations you have (exponentially more), and this makes the chance of having bugs or errors much higher, because a controls becomes impossible to test as one can't foresee all possibilities.
That said, we have shown a way to edit checkboxes with a single click in the following article, so you may find it useful: https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/data-editing/edit-mode/batch-editing/how-to/editing-checkboxes.
Regards,
Marin Bratanov
Progress Telerik
Hi Marin,
Thank you for sharing the fix. It works fine. The only issue with this solution is that filter is not working on this as like normal telerik grid checkbox.
Regards
Muhammad
Hi Muhammad,
Could you please share what is the desired behavior when filtering the Template column with the checkboxes?
Currently in the sample demonstrated in the article linked by Marin, it is enough to enable the AllowFilteringByColumn property of the RadGrid and the default Filtering of RadGrid should be working.
In short, you can check or uncheck the filter checkbox to set the filter value and select the desired FilterFunction - "NoFilter", "EqualTo", "NotEqualTo", etc. to apply the filtering based on both the filter function and the filter value (checked/unchecked).
In case the desired filtering is different than the default one, you can use FilterTemplate to implement a custom one, see
- https://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/filter-templates/defaultcs.aspx (refer to the last column in the first Grid)
I hope this will help.
Hi Marin,
I was trying to edit (check / uncheck) grid checkbox on first click. Also, I need filter on this column as well. I have used GridTemplateColumn by following this article.
Thanks
Hi Muhammad,
I assume that you would like to apply the checked/unchecked filter by simply clicking on the checkbox with no need to select the Filter function, similar to this behavior - http://somup.com/c3Xbi4vSeY
If so, you can set the CurrentFilterFunction property of the boolean column to "EqualTo" and enable the AutoPostBackOnFilter property. That way clicking on the filter checkbox will force filtering the RadGrid right away.
<telerik:GridTemplateColumn DataField="BoolField1" HeaderText="Template Column" UniqueName="BoolField1" CurrentFilterFunction="EqualTo" AutoPostBackOnFilter="true">
I have also attached a sample project for you to test the suggested approach. To be able to run the sample you will need to add the Telerik.Web.UI.dll to the bin folder of the project.
Note that the sample demonstrates just the filtering behavior and actual CRUD operations are not implemented.
I hope this helps
Hello Sai,
I've provided a working code snippet in the other forum thread:
https://www.telerik.com/forums/batch-edit-direct-edit-without-clicking-the-row-or-cell
Regards,
Eyup
Progress Telerik