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

Grid: pagesize dropdown issue

2 Answers 37 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Manish
Top achievements
Rank 1
Manish asked on 26 Jul 2010, 04:45 PM
Hello Experts,

I am new to telerik controls and I am using telerik grid control. I have implemented basic paging grid as shown in grid control example. I have two parts in my web page one is User List part at right side and other is a Form to edit Users Profile. User Name are Hyperlinks to the page itself with userid as queryString. When user click on any User Name link I am loading that users detail in the left side form to edit its detail.

The page jump upon clicking on page links i.e. 1,2,3,4,... working fine..... but when I change the Page Size value from dropdown... my grid just disapear. Upon reload the page it shows again with the selected value in dropdown. for example default page size is 5 and I changed it to 10.... grid disapear.... when I reload the page it shows with 10.

My datasource is a dataset table which I am getting by calling a Stored Procedure.

Please help me to get my grid visible upon changing dropdown value.

One more thing I want to do.... User Name in grid are hyperlinks to page itself with userid as querystring... If I click on a User Name on 5th page I want to be on 5th page when page loads that users detail.


Thanks
Manish

2 Answers, 1 is accepted

Sort by
0
Accepted
Cori
Top achievements
Rank 2
answered on 26 Jul 2010, 05:54 PM
Hello Manish,

Where are you binding the table to the RadGrid control? Are you doing it in the RadGrid's NeedDataSource event?.

I guessing the reason the page size is not working is because the RadGrid must be trying rebind its results from the datasource, which no longer exists, in order to refresh its paging display. So either move your binding to the NeedDataSource event or rebind the grid every time the PageSize event is called.

I hope that helps.
0
Manish
Top achievements
Rank 1
answered on 26 Jul 2010, 06:49 PM
Thanks Cori,

I was looking at this in the example but was not sure how to use it.  After some practice I got that I need to add the datasource to grid only without binding it to the grid.

Can you help me for my other requirement of retaining same page while editing user profile.

Thanks
Manish
Tags
Grid
Asked by
Manish
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Manish
Top achievements
Rank 1
Share this question
or