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

Rad Grid Paging

3 Answers 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bhupinder Singh
Top achievements
Rank 1
Bhupinder Singh asked on 08 Aug 2011, 12:24 PM
Hi,

we are using rad grid in one of our project. I have a small issue. In the rad grid  I have three columns with check boxes. I use jquery to select and deselect all check boxes in Rad Grid. This works fine. My problem is with paging. I am using default paging behaviour of RadGrid. The problem is that on the new page the checkbox in the page which fires click event to select and deselect checkboxes in Grid is still checked. As the paging is done with client side code in RadGrid , I need a way to set default value to check box on the page again. For example, on the first page user clicks on select all check box and all checkboxes in grid are selected. Now the user goes to next page the checkboxes in Grid are not selected which is desired behaviour but the check box on the page is still selected. And now if user wishes to select all check boxes in Grid he must click on the checkbox on the page twice to get the desired behaviour. Is there a client side event for paging so that I can add some jquery code there to set the checkbox value on the page back to default value.



Regards,

Bhupinder

3 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 08 Aug 2011, 12:30 PM
Hello Bhupinder Singh,

if you are used  GridClientSelectColumn then use below links.
Persisting the Selected Rows Client-side on Sorting/Paging/Filtering/Grouping
http://www.telerik.com/community/forums/aspnet-ajax/grid/how-save-values-and-states-before-after-paging.aspx

else

You have to store the checked checkbox column's value in ViewState/Session and restore it using ItemDataBound Event.
http://www.telerik.com/help/aspnet/grid/grddeletegriditemsdependingoncheckboxstate.html


let me know if any concern.

Thanks,
Jayesh Goyani
0
Bhupinder Singh
Top achievements
Rank 1
answered on 09 Aug 2011, 09:28 AM
Hello,

thanks, I have one last question regarding RadGrid. We already have RadGrid in our application and we don't want to replace that with asp.net gridview , but would it be possible that RadGrid does not do with ajax functionality and it works like a normla asp.net control. Making postbacks to the server.


Regards,


Bhupinder
0
Bhupinder Singh
Top achievements
Rank 1
answered on 11 Aug 2011, 03:15 PM
Hello,

I solved my problem by adding the control to RadAjaxManager UpdatedControls collection. Now I can change state of the control in PageIndexChanged event of RadGrid.


Regards


Bhupinder
Tags
Grid
Asked by
Bhupinder Singh
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Bhupinder Singh
Top achievements
Rank 1
Share this question
or