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

GridCheckBoxColumn and Batch Edit

10 Answers 346 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Najid Hanif
Top achievements
Rank 2
Najid Hanif asked on 05 Nov 2013, 02:09 AM
When clicking on a GridCheckBoxColumn (The actual Check box) and the grid is in Batch Edit mode, the cell is not editable. You can click outside of the check box to make the cell editable but clicking on the check box does nothing. You can see this here in your own demo

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

Sort by
0
Angel Petrov
Telerik team
answered on 07 Nov 2013, 01:33 PM
Hello,

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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Najid Hanif
Top achievements
Rank 2
answered on 07 Nov 2013, 01:50 PM
Why does it HAVE to be disabled? Does the grid give me an option so it is not disabled?
0
Angel Petrov
Telerik team
answered on 08 Nov 2013, 03:19 PM
Hi,

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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Geoff
Top achievements
Rank 1
answered on 19 Nov 2013, 03:21 PM
Hi Najid,

I don't know if this is any good to you now but I had this exact same problem. When I raised a thread on it I got a solution detailed here.
0
Najid Hanif
Top achievements
Rank 2
answered on 19 Nov 2013, 03:40 PM
Hi Geoff and thanks for the heads up on that. I knew I could fix the issue with a template column, but I guess I am a little anoyed that Telerik is just going to ignore the issue on their end. If we can fix it with a template column, they can fix it on their GridCheckBoxColumn when it batch edit mode.
0
Angel Petrov
Telerik team
answered on 22 Nov 2013, 10:58 AM
Hello Andy,

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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Rob Ainscough
Top achievements
Rank 1
answered on 25 Sep 2018, 11:01 PM

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.

0
Marin Bratanov
Telerik team
answered on 26 Sep 2018, 12:48 PM
Hi 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
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Shoaib
Top achievements
Rank 1
commented on 09 Nov 2022, 09:50 AM

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

Doncho
Telerik team
commented on 14 Nov 2022, 08:24 AM

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

I hope this will help.

Shoaib
Top achievements
Rank 1
commented on 14 Nov 2022, 09:10 AM

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.

https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/data-editing/edit-mode/batch-editing/how-to/editing-checkboxes

 

Thanks

Doncho
Telerik team
commented on 17 Nov 2022, 07:41 AM

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

0
sai
Top achievements
Rank 1
answered on 20 Dec 2019, 11:28 AM
whether this is possible only for check box.Can we do it for dropdown? Since i have same  dropdown in itemtemplate and edititem template.When i follow about method for that.it is not working.Any other suggestion for that.
0
Eyup
Telerik team
answered on 25 Dec 2019, 10:24 AM

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

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Najid Hanif
Top achievements
Rank 2
Answers by
Angel Petrov
Telerik team
Najid Hanif
Top achievements
Rank 2
Geoff
Top achievements
Rank 1
Rob Ainscough
Top achievements
Rank 1
Marin Bratanov
Telerik team
sai
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or