RadDataPagerPageSizeField - change records per page

3 posts, 1 answers
  1. Jon
    Jon avatar
    24 posts
    Member since:
    Apr 2009

    Posted 11 Mar 2010 Link to this post

    Is it just me or have I missed something, I have set the list view to show 16 records per page and the data pager drop down now shows in the data pager options of 5,10,16,20,50

    But I want the option to have more than 50, would would be good is either am ALL option or say 100

    is this not possible?
  2. Answer
    Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 12 Mar 2010 Link to this post

    Hello Jon,

    You can handler FieldCreated event and add extra item for RadComboBox. For example:
    01.protected void RadDataPager1_FieldCreated(object sender,RadDataPagerFieldCreatedEventArgs e)
    02.    {
    03.        if (e.Item.Field is RadDataPagerPageSizeField)
    04.        {            
    05.            var combo = e.Item.FindControl("PageSizeComboBox") as RadComboBox;
    06.            if (combo != null)
    07.            {
    08.                AddComboItem(combo,"16");
    09.                AddComboItem(combo,"100");
    10.                AddComboItem(combo,"160");
    11.            }
    12.        }
    13.    }
    14.  
    15.    protected void AddComboItem(RadComboBox combo, string value)
    16.    {         
    17.        if (combo.FindItemByValue(value) == null)
    18.            combo.Items.Add(new RadComboBoxItem(value, value));
    19.    }


    Sincerely yours,
    Nikolay
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jon
    Jon avatar
    24 posts
    Member since:
    Apr 2009

    Posted 16 Mar 2010 Link to this post

    that's great thanks, just what i needed
Back to Top