GridCheckBoxColumn and Batch Edit

9 posts, 0 answers
  1. Najid Hanif
    Najid Hanif avatar
    92 posts
    Member since:
    Jul 2011

    Posted 04 Nov 2013 Link to this post

    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
  2. Angel Petrov
    Admin
    Angel Petrov avatar
    1076 posts

    Posted 07 Nov 2013 Link to this post

    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.
  3. Najid Hanif
    Najid Hanif avatar
    92 posts
    Member since:
    Jul 2011

    Posted 07 Nov 2013 Link to this post

    Why does it HAVE to be disabled? Does the grid give me an option so it is not disabled?
  4. Angel Petrov
    Admin
    Angel Petrov avatar
    1076 posts

    Posted 08 Nov 2013 Link to this post

    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.
  5. Geoff
    Geoff avatar
    53 posts
    Member since:
    Aug 2012

    Posted 19 Nov 2013 Link to this post

    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.
  6. Najid Hanif
    Najid Hanif avatar
    92 posts
    Member since:
    Jul 2011

    Posted 19 Nov 2013 Link to this post

    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.
  7. Angel Petrov
    Admin
    Angel Petrov avatar
    1076 posts

    Posted 22 Nov 2013 Link to this post

    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.
  8. Rob Ainscough
    Rob Ainscough avatar
    243 posts
    Member since:
    Jan 2010

    Posted 25 Sep 2018 in reply to Angel Petrov Link to this post

    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.

  9. Marin Bratanov
    Admin
    Marin Bratanov avatar
    4489 posts

    Posted 26 Sep 2018 Link to this post

    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.
Back to Top