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

Allow paging is not working

1 Answer 44 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Asif asked on 24 Sep 2010, 02:15 PM
        Allow paging is not working in radgrid. Please check the code below:
<radW:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Office2007">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<radspl:RadSplitter Width="100%" Height="100%" ID="RadSplitter1" runat="server" 
Orientation="Horizontal" Skin="Office2007" VisibleDuringInit="false">
<radspl:RadPane ID="RadPane1" runat="server" Height="167" MinHeight="79">
<radG:RadGrid ID="RadGrid1" runat="server" PageSize="5" AllowSorting="true"
EnableAJAXLoadingTemplate="true" AllowPaging="true" AutoGenerateColumns="False" EnableAJAX="True"
="None" Skin="Office2007">
 <asp:Panel ID="Panel1" Width="100%" Height="100%" runat="server">
   <img src="Images/Loading.gif" style="z-index: 100" />
<ExportSettings IgnorePaging="True" OpenInNewWindow="True" />
<PagerStyle Mode="NextPrevAndNumeric" />
<MasterTableView DataKeyNames="ID" AllowPaging="true" AllowSorting="true">
   <radG:GridBoundColumn DataField="ID" UniqueName="ID" Display="false">
   <radG:GridBoundColumn DataField="Name" UniqueName="Name">
<ClientSettings ApplyStylesOnClient="True" EnableClientKeyValues="True">
  <Selecting AllowRowSelect="True" />
  <ClientEvents OnGridCreated="GridCreated" OnRequestStart="GridRequestStart" 
OnRowContextMenu="ContextMenu" />

Note: im using classic radgrid.

Please find me the solution as soon as possible.

Thanks in Advance.


1 Answer, 1 is accepted

Sort by
Top achievements
Rank 2
answered on 27 Sep 2010, 08:23 AM
Hello Asif

From the given code, I assume that you are using Simple DataBinding technique which can be used in simple scenarios which does not require complex operations on grid. Keep in mind that if you choose simple data-binding, you will need to assign data-source and rebind the grid after each operation (paging, sorting, editing, etc.) - this copies exactly MS DataGrid behavior.

You need this code for Paging to work:
protected void RadGrid1_PageIndexChanged(object source, Telerik.WebControls.GridPageChangedEventArgs e)
    LoadData(); // For populating grid

A better option is using advanced data-binding through its NeedDataSource event or data source control.
Advanced data-binding

Asked by
Top achievements
Rank 1
Answers by
Top achievements
Rank 2
Share this question