Gridview "Check All" functionality in group rows

6 posts, 0 answers
  1. john
    john avatar
    6 posts
    Member since:
    Aug 2015

    Posted 24 Feb 2019 Link to this post

    Hello, I am currently implenting the "Check All" functionality in group rows. Using this code that I've found here https://www.telerik.com/support/kb/reporting/details/check-all-functionality-in-group-rows

    The "Check All" functionality itself works. But it's causing some trouble when I check more than one row individually. The error I'm getting is "The specified change is invalid." And it happens on this line "if ((bool)row.Cells["Include"].Value == false)"

     

    Thanks in advance!

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3895 posts

    Posted 25 Feb 2019 Link to this post

    Hello, John,         

    I have downloaded the provided sample project in the referred KB article and tried to replicate the error you are facing. Everything seems to work as expected on my end. Please refer to the attached gif file illustrating the behavior on my end with the latest version (2019.1 219). Am I missing something? Could you please specify the exact steps how to reproduce the problem?

    Off topic, I have deleted the other duplicated forum thread that you have opened.

    I am looking forward to your reply.

    Regards,
    Dess | Tech Support Engineer, Sr.
    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.
  3. Nicklas
    Nicklas avatar
    21 posts
    Member since:
    Feb 2016

    Posted 25 Feb 2019 Link to this post

    I see. The my application is slightly different than the example, the only diffirence isthe way I populate the grid. First I take the data I want from the backend (datasource is bound to a system.data.datatable) after that I add the checkbox column like below:

                GridViewCheckBoxColumn checkBoxColumn = new GridViewCheckBoxColumn();
                checkBoxColumn.DataType = typeof(int);
                checkBoxColumn.Name = "ChkCol";
                checkBoxColumn.HeaderText = "Include";
                GridProducts.MasterTemplate.Columns.Add(checkBoxColumn);

    I can't see how that should be able to affect the behavior, but I realy need some advice. Thanks in advance

  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3895 posts

    Posted 26 Feb 2019 Link to this post

    Hello, Nicklas,         

    If you add the GridViewCheckBoxColumn programmatically, note that it is important to specify the FieldName property of the column to the respective field in the DataBoundItem. Thus, the values will display in the column only if the value in FieldName is within the range of values provided by the ValueMember field values. As a result the CellValueChanged event will be fired and you check/uncheck the checkbox and the respective field in the DataBoundItem will be properly updated.

    However, if you are still experiencing any further difficulties, it would be greatly appreciated if you can submit a support ticket from your account and provide your updated version of the sample project. Thus, our support staff would be able to investigate the precise case and assist you further. Thank you in advance.

    Should you have further questions please let me know.

    Regards,
    Dess | Tech Support Engineer, Sr.
    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.
  5. Nicklas
    Nicklas avatar
    21 posts
    Member since:
    Feb 2016

    Posted 26 Feb 2019 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Thanks this solved the problem, however, it would be a very nice to see some more default behavior when it comes to hierarchical and grouped grids. Most of the work when working with those are often custom behavior and takes alot of lines. Anyway thanks :)!
  6. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3895 posts

    Posted 26 Feb 2019 Link to this post

    Hello, Nicklas,         

    I am glad that the problem you were facing is now resolved.

    As to the custom implementation, your feedback is greatly appreciated. Currently, RadGridView handles the check-all functionality in the header checkbox. For the group rows, this functionality is not designed to be handled. That is why it requires the specified custom implementation.

    In case other customers have similar requests, we will consider it in the future improvement of the control.  

    If you need any further assistance please don't hesitate to contact me. 

    Regards,
    Dess | Tech Support Engineer, Sr.
    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