Page Size default to "All"

2 posts, 0 answers
  1. TS
    TS avatar
    5 posts
    Member since:
    Apr 2010

    Posted 06 Aug 2015 Link to this post

    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.​

     

  2. Eyup
    Admin
    Eyup avatar
    3699 posts

    Posted 10 Aug 2015 Link to this post

    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
Back to Top