All Products
Demos
Pricing
Services
Blogs
Docs & Support
Search
Shopping cart
Login
Contact Us
Get A Free Trial
close mobile menu
Telerik Forums
/
UI for ASP.NET AJAX Forum
/
Grid
/
PageSize and custom pager templates
Cancel
Telerik UI for ASP.NET AJAX
Resources
Buy
Try
Feed for this thread
5 posts, 0 answers
Steve Bough
16 posts
Member since:
Jul 2007
Posted 01 Sep 2008
Link to this post
I've run into a weird little problem with page sizes and a custom pager template.
I'm using the javascript supplied in the sample http://demos.telerik.com/ASPNET/Prometheus/Grid/Examples/Programming/PagerTemplate/DefaultCS.aspx
to change page number and page size, which works perfectly fine.
The problem is that when I construct the Grid initially (i.e. !IsPostBack) I'm setting grid.PageSize and grid.MasterTableView.PageSize to 30 (our preferred default).
That works fine until I hit a page change link when the page size subsequently resets itself back to the default value 10.
If I change the page size from the client, the new page size is retained on subsequent post-backs, otherwise it remains at 10.
It looks like the viewstate value of the page size is somehow not picking up the server side change despite it being done before the grid is added to the control tree.
Is there any way around this problem, perhaps something else I can set server side which will fix it?
I can provide a simple example if that helps.
Vlad
Admin
11100 posts
Posted 01 Sep 2008
Link to this post
Hi Steve,
Please set PageSize to the grid instead of MasterTableView
and let me know how it goes.
Greetings,
Vlad
the Telerik team
Check out
Telerik Trainer
, the state of the art learning tool for Telerik products.
Steve Bough
16 posts
Member since:
Jul 2007
Posted 01 Sep 2008
Link to this post
I'm actually setting both of them since I wasn't sure which one was important. Doesn't seem to help.
John
5 posts
Member since:
Mar 2008
Posted 01 Sep 2008
Link to this post
Hello,
I am telerik fans. at the moment i still could not create customized page navigation on the telerik grid. Is there any one where want to get me the example on how to customized the page navigation on the grid in small project file.
Cheers,
JOHNG
Princy
17421 posts
Member since:
Mar 2007
Posted 01 Sep 2008
Link to this post
Hello John,
Check out this online demo which demonstrates how the PagrerItems can be customized using a template.
PagerTemplate
Princy.
Back to Top
Close