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

Dynamic Page size in Radgrid.

3 Answers 179 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Swapna M
Top achievements
Rank 1
Swapna M asked on 20 Apr 2010, 05:46 AM
Hi,
    I want to dynamically change pagesize of Radgrid as shown in your demo.
I am doing the following settings.

<PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
AllowPaging="True" PageSize="5"

But still page size dropdown doesn't seem to work.
Am i missing something here?


Thanks.

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 20 Apr 2010, 05:24 PM
Hi Swapna,

Please, try setting the PageSize property for the RadGrid control on PreRender event as shown below:
C#:
protected void RadGrid1_PreRender(object sender, EventArgs e)  
{  
    RadGrid1.PageSize = 5;  
    RadGrid1.MasterTableView.Rebind();  
}  

I hope this helps.

Best wishes,
Pavlina
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.
0
Swapna M
Top achievements
Rank 1
answered on 21 Apr 2010, 11:03 AM
Hi Pavlina,
    Thanks for your reply.

The above solution is not working.
Please refer the attached aspx and aspx.cs files.
Let me know if i am missing something.


Thanks.
0
Pavlina
Telerik team
answered on 21 Apr 2010, 02:25 PM
Hello Swapna M,

Attached to this message i  a simple working application which handles the desired functionality. Please check it out and let me know if it works for you or if I am leaving something out.

Greetings,
Pavlina
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
Swapna M
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Swapna M
Top achievements
Rank 1
Share this question
or