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!
5 Answers, 1 is accepted
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
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
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
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