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

PageSizeChanged - How to save and apply values

3 Answers 73 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 13 Sep 2010, 09:30 PM
Hi..
I have mutiple pages with multiple grids. How can I 'capture' the new PageSize - when a user changes it and apply to all pages and grids?
thanks

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 14 Sep 2010, 07:30 AM
Hello Jon,

You could set the PageSize of second grid in the PageSizeChanged event of other. See the example.


Code:
protected void RadGrid1_PageSizeChanged(object source, GridPageSizeChangedEventArgs e)
{
    RadGrid2.MasterTableView.PageSize = RadGrid1.MasterTableView.PageSize;
    RadGrid2.MasterTableView.Rebind();
}


-Shinu.
0
Jon
Top achievements
Rank 1
answered on 14 Sep 2010, 11:48 AM
The grids are on separate pages too... I assume I can set a session to the page size but how do I apply it in the pagesizechange, so it change be changed/set on any page.
thanks
0
Iana Tsolova
Telerik team
answered on 15 Sep 2010, 12:17 PM
Hello Jon,

Indeed, you can save the PageSize in Session. Then on Page_Load event set the PageSize property for the grids on the current page. Other than this you cannot set the PageSize for all the grids in the application globally.

Kind regards,
Iana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Jon
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Jon
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or