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

RadGrid Demos

5 Answers 491 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 04 Sep 2009, 10:24 PM
Hi all:

On this demo page showing 3 RadGrids:

http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/paging/defaultcs.aspx

The 3rd grid shows a drop-down that allows the user to select the Page Size, however in the source code I do not see how that drop-down is enabled/disabled. Does anyone know how to do this?

John.

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 07 Sep 2009, 05:57 AM
Hello John,

This drop down is automatically generated - you can use pager template to define your own controls.

All the best,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Princy
Top achievements
Rank 2
answered on 07 Sep 2009, 06:48 AM
Hello John,

If you want to disable the autogenerated page-size combobox, then you can try the following code:
c#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)   
{   
  if (e.Item is GridPagerItem)   
  {   
    Label lblPageSize = (Label)e.Item.FindControl("ChangePageSizeLabel");   
    lblPageSize.Visible = false;  
    RadComboBox comboPageSize = (RadComboBox)e.Item.FindControl("PageSizeComboBox");   
    comboPageSize.Enabled = false;   
  }   
}  

You can also refer to the following document on how to customize the properties of the buttons or labels inside the pager row in the grid:
Accessing the elements of advanced type pager

-Princy.
0
John
Top achievements
Rank 1
answered on 07 Sep 2009, 12:19 PM
Hi Vlad:

Thanks for your message. If that drop-down is automatically generated, why does it not show in the first 2 grids, only the 3rd? Seeing that, it seems logical there MUST be a setting somewhere to hide/show the grid....

John.
0
John
Top achievements
Rank 1
answered on 07 Sep 2009, 12:19 PM
Thanks I'll give it a try!
0
Dnyaneshwar
Top achievements
Rank 1
answered on 29 Jan 2014, 09:37 AM
@Princy .....thats grat yar i realy need that
Tags
Grid
Asked by
John
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Princy
Top achievements
Rank 2
John
Top achievements
Rank 1
Dnyaneshwar
Top achievements
Rank 1
Share this question
or