Add Page sizes combobox on Paging panel (RadGridView)

3 posts, 1 answers
  1. Paul
    Paul avatar
    34 posts
    Member since:
    Apr 2017

    Posted 10 Oct 2017 Link to this post

    Hello,
    I need to add "page sizes" combobox on Paging panel (RadGridView), please help me to implement it!
    Thanks
  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    2931 posts

    Posted 11 Oct 2017 Link to this post

    Hi Paul,

    Here is an example for this:
    public Form1()
    {
        InitializeComponent();
       
        CommandBarDropDownButton button = new CommandBarDropDownButton();
        button.Text = "PageSize";
        button.DrawText = true;
        button.DrawImage = false;
        button.StretchHorizontally = false;
      
        for (int i = 0; i < 5; i++)
        {
            RadMenuItem item = new RadMenuItem();
            item.Text = (i + 1) + "0";
            item.Click += item_Click;
            button.Items.Add(item);
        }
        radGridView1.GridViewElement.PagingPanelElement.TextBoxStripElement.Items.Add(button);
    }
    void item_Click(object sender, EventArgs e)
    {
        int pageSize = Convert.ToInt32(((RadMenuItem)sender).Text);
        radGridView1.MasterTemplate.PageSize = pageSize;
    }

    Should you have any other questions do not hesitate to ask.

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Paul
    Paul avatar
    34 posts
    Member since:
    Apr 2017

    Posted 11 Oct 2017 in reply to Dimitar Link to this post

    Hello Dimitar,
    This problem have been fixed
    Thanks you for your help
    Regard,
    Paul
Back to Top