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

Change Page Size

1 Answer 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brian Adle
Top achievements
Rank 1
Brian Adle asked on 12 Nov 2009, 10:20 PM
We're trying to keep track of a users preferred page size and set that at page load when they return to our site.  This works fine when they set the page size to an amount less than the current number of records.  But when a user has 25 records and sets the page size to 50, it sets it to 25.  50 doesn't get passed to the code behind PageSizeChanged method, instead 25 does.  I've looked into the control and the JS on the change button is:
var cpsi = document.getElementById("grdResults__ChangePageSizeTextBox"); if ( cpsi.value > 12 || cpsi.value == 12){cpsi.value=Math.min(12,12);return false;};

Clearly this amount is being adjusted client side if it is greater than the current record count.  The question is can I turn this off? It's a pain if the user tries to set the max to 50, it gets set to 25, then they add a new record and it's on the next page.

Thanks for your help.

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 18 Nov 2009, 08:08 AM
Hello Brian,

Basically, there is no straightforward option to alter this behavior. Another option which you can consider in your case, would be to use a pager template, where you can nest the preferred selection of controls.
Or, you can alter the pagerMode for the control, removing the numeric control from the pager.

Kind regards,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Brian Adle
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or