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

Page Size radgrid

2 Answers 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dario Zanelli
Top achievements
Rank 1
Dario Zanelli asked on 13 Jul 2010, 11:27 AM
Hi all,

I would like to know whether is possible to disable the page size on a rad grid.
I need paging, but if the client changes the page size destroys the layout.
I haven't found the relative property.

Kind regards,

Dario Zanelli

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 13 Jul 2010, 12:18 PM
Hello Dario,

You can disable the Pagesize ComboBox in PagerItem by using following code snippet.

C#:
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
   {
       if (e.Item is GridPagerItem)
       {
           RadComboBox combo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
           combo.Enabled = false;
       }
   }

Also refer the following documentation which describes how to access the controls inside Pager.
Accessing the elements of advanced type pager

Thanks,
Princy.
0
Dario Zanelli
Top achievements
Rank 1
answered on 13 Jul 2010, 12:31 PM
Thank you, it works!!

Dario
Tags
Grid
Asked by
Dario Zanelli
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Dario Zanelli
Top achievements
Rank 1
Share this question
or