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

Page Size default to "All"

1 Answer 213 Views
Grid
This is a migrated thread and some comments may be shown as answers.
TS
Top achievements
Rank 1
TS asked on 06 Aug 2015, 03:15 PM

Hello

I have enabled All in the paging options with the RadGrid using this code: 

<PagerStyle EnableAllOptionInPagerComboBox="true" />

How would I default the paging to "All"? I tried PageSize="All" in the RadGrid tag but it throws an error. 

 

Cannot create an object of type 'System.Int32' from its string representation 'All' for the 'PageSize' property.​

 

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 10 Aug 2015, 02:52 PM
Hello Todd,

You can use the following approach to achieve this requirement:
protected void Page_Init(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        RadGrid1.PageSize = int.MaxValue;
    }
}

Hope this helps. Please give it a try and let me know if it works for you.

Regards,
Eyup
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
TS
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or