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

Paging in Rad grid

3 Answers 54 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Azees
Top achievements
Rank 1
Azees asked on 06 Oct 2008, 11:25 AM
Hi ...

How to set paging concept in rad grid...?

i have one dropdown like ....

 

<asp:DropDownList ID="DropDownList1" runat="server">

 

 

<asp:ListItem Value="10"></asp:ListItem>

 

 

<asp:ListItem Value="20"></asp:ListItem>

 

 

<asp:ListItem Value="30"></asp:ListItem>

 

 

</asp:DropDownList>

 

If i select 10 from tht dropdown the grid only show 10 record...

how to i solve this problem  ..

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 06 Oct 2008, 11:27 AM
Hello Azees,

You can set AutoPostBack to true, handle SelectedIndexChanged and set the SelectedValue as grid PageSize.

Best wishes,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Azees
Top achievements
Rank 1
answered on 06 Oct 2008, 12:06 PM
i saw ur reply is nice..

i already did it but when i select dropdown values The grid records will be hidden...i cant see a single record ....
0
Sebastian
Telerik team
answered on 06 Oct 2008, 12:28 PM
Hello Azees,

Do you rebind your grid instance when you change the page size through the dropdown control? You may also consider using pager template with dropdown list control for page size change as illustrated in this online demo of the product:

http://demos.telerik.com/ASPNET/Prometheus/Grid/Examples/Programming/PagerTemplate/DefaultCS.aspx

Moreover, verify that you are using advanced binding through the NeedDataSource event of the grid and refresh it using its Rebind() method. Review these articles which illustrate the NeedDataSource/RadGrid control lifecycle for more details:

http://www.telerik.com/help/aspnet-ajax/grdadvanceddatabinding.html
http://www.telerik.com/help/aspnet-ajax/grdeventsequence.html

Best regards,
Stephen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Azees
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Azees
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or