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

PagerStyle Issue

2 Answers 23 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ken Jones
Top achievements
Rank 1
Ken Jones asked on 25 Oct 2010, 05:11 PM
Hello,

I was wondering whether it is possible to use the NextPrevAndNumeric PagerStyle without allowing users the option to change the page size. It doesnt seem to work properly in my solution (see screenshot), I would like it to be fixed in any case.

Thanks,

Ken

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 26 Oct 2010, 06:55 AM
Hello Ken,

You can hide/disable the PageSizeCombobox and PageSize Label in PagerItem by using following code snippet.

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
   {
      if (e.Item is GridPagerItem)
       {
           RadComboBox combo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
           combo.Visible = false;
           Label lblPageSize = (Label)e.Item.FindControl("ChangePageSizeLabel");
           lblPageSize.Visible = 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
Ken Jones
Top achievements
Rank 1
answered on 26 Oct 2010, 08:56 AM
Thanks for the quick response, that has worked!

Ken
Tags
Grid
Asked by
Ken Jones
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Ken Jones
Top achievements
Rank 1
Share this question
or