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

When a user select all rows from a grid then restrict system to automatically select the header check box.

1 Answer 31 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Himanshu
Top achievements
Rank 1
Himanshu asked on 14 Jan 2014, 06:19 PM
I am using a telerik grid where i have used a column for checkbox to select row. When user header checkbox then all rows in that grid irrespective of current page got selected. Now what is the problem is that if user goes on last page then select a row which is the only row available on last page then system automatically select the header checkbox as this is the inbuilt feature of telerik grid. So how can i restrict this funtionality as user seletected only that row of that grid not all rows of all pages.

I have attached the snapshot of grid which have 2 pages and on 2nd page there is only one record and if i selected this record it check the header of check box automatically.

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 17 Jan 2014, 01:09 PM
Hello Himanshu,

The default behavior of grid row selection works on the current page only and they are not persisted through rebind operations such as paging, sorting, filtering, grouping, etc. Having that in mind, the header checkbox will be automatically checked if all items in the current page are selected, which is the case in the attached screenshot. 

If you want to persist selected items, please refer to the following Code Library:

Hope that helps.


Regards,
Konstantin Dikov
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.
Tags
Grid
Asked by
Himanshu
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or