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

RadGrid Paging Arrow not working

1 Answer 142 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Saurabh
Top achievements
Rank 1
Saurabh asked on 04 Nov 2014, 06:25 AM
Hi guys,

we are using radgrid to display data from database.
Now problem is that, if i click on Paging forward arrow or backward arrow my page is not working. Only if i click on number for the next page then only i am getting the result. can any one help me on this ..
 
Below is the code which use for grid view. Please help it's very urgent.

 <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
     <telerik:RadAjaxLoadingPanel ID="RadLoadingPanel1" runat="server" />
         <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
               <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="radProductsGrid">
                    <UpdatedControls>
                    <telerik:AjaxUpdatedControl  LoadingPanelID="RadAjaxLoadingPanel1">
                    </telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                    </telerik:AjaxSetting>
               </AjaxSettings>
         </telerik:RadAjaxManager>
     <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
     <asp:Image ID="Image1" runat="server" ImageUrl="image/loader_gif.gif"></asp:Image>
   </telerik:RadAjaxLoadingPanel>
    <telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="Buttons" >
    </telerik:RadFormDecorator> 


<telerik:RadGrid ID="RadGrid1" EnableViewState="True" runat="server" AllowPaging="true" ShowFooter="true" AllowSorting="True" AllowFilteringByColumn="true" GridLines="None" AutoGenerateColumns="false" Skin="Sunset" OnItemCommand ="RadGrid1_ItemCommand" PageSize ="10">
        <%--<HeaderStyle BackColor="DarkBlue" />--%>
         <ItemStyle Wrap="false"></ItemStyle>
          <GroupingSettings CaseSensitive="false" />
            <ClientSettings>
                <Scrolling AllowScroll="True" UseStaticHeaders="true" />
            </ClientSettings>
              <%--<AlternatingItemStyle BackColor="LightBlue" />--%>
           <MasterTableView AllowMultiColumnSorting="true" TableLayout="Fixed" AutoGenerateColumns="false" CommandItemDisplay="Top">
                 <CommandItemTemplate>
                <div style="padding: 5px 5px; background-color:#FFFFFF; border:0px;">
                     <asp:Label CssClass="lblrepname" ID="Label1" runat="server" Text="Primary Insurance Aging"></asp:Label>
                <%--<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="image/down.png"
               OnClick="ImageButton1_Click" AlternateText="Html" /> Download--%>
                   <%-- <asp:linkbutton id="btnEditSelected" runat="server" CommandName="EditSelected" Visible='<%# RadGrid1.EditIndexes.Count == 0 %>'><img style="border:0px;vertical-align:middle; text-align:right;" alt="" src="image/down.png" /> Edit selected</asp:LinkButton> --%>

                </div>
                    </CommandItemTemplate>


               <Columns>
                <telerik:GridBoundColumn DataField="Practice_Short_Name" HeaderStyle-CssClass="Headalign" AllowFiltering="true" AutoPostBackOnFilter="true" FilterControlAltText="Practice_Short_Name" Visible ="false" ShowFilterIcon ="false" CurrentFilterFunction="EqualTo"
                    HeaderText="Practice Short Name" UniqueName="PSN">
                </telerik:GridBoundColumn>

               <telerik:GridBoundColumn DataField="Carrier_Name" HeaderStyle-CssClass="Headalign" FilterControlAltText="Carrier_Name" AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" ShowFilterIcon="false" AllowFiltering="true" AllowSorting="true"
                    HeaderText="Carrier Name" UniqueName="AS">
                </telerik:GridBoundColumn>

               <telerik:GridTemplateColumn  AllowSorting="true" HeaderStyle-CssClass="Headalign" SortExpression="No_Of_Vouchers" FilterControlWidth="100px" ShowFilterIcon="False" CurrentFilterFunction="EqualTo" AutoPostBackOnFilter="true" DataField="No_Of_Vouchers" HeaderText = "Number of Claims"  > 
                        <ItemStyle HorizontalAlign ="Center" />
                        <ItemTemplate>
                            <asp:Label ID="lblclaimno" runat="server"   Text='<%#Convert.ToInt32(Eval("No_Of_Vouchers")) %>' ></asp:Label>
                        </ItemTemplate>
                       
                    </telerik:GridTemplateColumn>
                      <telerik:GridTemplateColumn DataField="Acer_Actual_Balance" HeaderStyle-CssClass="Headalign" FilterControlAltText="Acer_Actual_Balance"
                    HeaderText="Actual Balance" UniqueName="lblaceractual"  ShowFilterIcon ="false" AllowSorting ="true" SortExpression ="Acer_Actual_Balance">
                             <ItemStyle HorizontalAlign ="Right" />
                              <ItemTemplate>
                             <asp:Label ID="lblaceractual" runat="server"    Text='<%#String.Format("{0:C0}",Convert.ToInt32(Eval("Acer_Actual_Balance"))) %>' ></asp:Label>
                           </ItemTemplate>
                </telerik:GridTemplateColumn>
                  
                    <telerik:GridTemplateColumn  AllowSorting="true" HeaderStyle-CssClass="Headalign" SortExpression="Zero_To_Thirty_Days" AutoPostBackOnFilter="true" DataField="Zero_To_Thirty_Days" HeaderText = "0 to 30 Days" ShowFilterIcon ="false" AllowFiltering="false"> 
                        <ItemStyle HorizontalAlign ="Right" />
                        <ItemTemplate>
                           <asp:LinkButton ID="Lnkzero" runat="server"  ForeColor ="Blue"  CommandArgument='<%#Eval("Practice_Short_Name") %>' CommandName="ZeoDays" Text ='<%#String.Format("{0:C0}",Convert.ToInt32(Eval("Zero_To_Thirty_Days")))%>'  ></asp:LinkButton>
                        </ItemTemplate>
                       
                    </telerik:GridTemplateColumn>
                      
                    <telerik:GridTemplateColumn  HeaderText="31 to 60 Days" HeaderStyle-CssClass="Headalign" allowfiltering="false" AllowSorting="true" SortExpression="Thirtyone_To_Sixty_Days" AutoPostBackOnFilter="true" DataField="Thirtyone_To_Sixty_Days" ShowFilterIcon="false" >
                        <ItemStyle HorizontalAlign ="Right" />
                        <ItemTemplate>
                                <asp:LinkButton ID="Lnkthirtydays" runat="server"  ForeColor ="Blue"  CommandArgument='<%#Eval("Practice_Short_Name") %>' CommandName="ThirtyDays" Text ='<%#String.Format("{0:C0}",Convert.ToInt32(Eval("Thirtyone_To_Sixty_Days")))%>'  ></asp:LinkButton>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                     <telerik:GridTemplateColumn  HeaderText="61 to 90 Days" HeaderStyle-CssClass="Headalign"  AllowSorting="true" AllowFiltering="false" SortExpression="Sixtyone_To_Ninety_Days" AutoPostBackOnFilter="true" DataField="Sixtyone_To_Ninety_Days" ShowFilterIcon ="false" >
                            <ItemStyle HorizontalAlign ="Right" />
                        <ItemTemplate>
                                 <asp:LinkButton ID="Lnksixty" runat="server"  ForeColor ="Blue"  CommandArgument='<%#Eval("Practice_Short_Name") %>' CommandName="sixtyDays" Text ='<%#String.Format("{0:C0}",Convert.ToInt32(Eval("Sixtyone_To_Ninety_Days")))%>'  ></asp:LinkButton>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                     <telerik:GridTemplateColumn  DataField="Ninetyone_Days_Plus" HeaderStyle-CssClass="Headalign" FilterControlAltText="Ninetyone_Days_Plus" ShowFilterIcon ="false" AllowFiltering ="false" AllowSorting ="true" SortExpression ="Ninetyone_Days_Plus"
                    HeaderText="90+Days" UniqueName="nintyplus"  > 
                      <ItemStyle HorizontalAlign ="Right" />
                           <ItemTemplate>
                                <asp:LinkButton ID="Lnkninty" runat="server"  ForeColor ="Blue"  CommandArgument='<%#Eval("Practice_Short_Name") %>' CommandName="NinetyPlus" Text ='<%#String.Format("{0:C0}",Convert.ToInt32(Eval("Ninetyone_Days_Plus")))%>' ></asp:LinkButton>
                           </ItemTemplate>
                       </telerik:GridTemplateColumn>
            
                </Columns>
               
            </MasterTableView>

        </telerik:RadGrid>





1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 04 Nov 2014, 08:18 AM
Hello Saurabh,

I revised the provided code and noticed that you do not have DataSource Control assigned in the markup as well as no handler for the NeedDataSource exists.
Therefore I would conclude that you are suing simple data binding by assigning DataSource for the RadGrid in the PageLoad event.
Note that if this is your scenario, simple data-binding mechanism is not supported with most of the RadGrid operations like paging, filtering, sorting, insert/update/delete ect.
Therefore please try implementing advanced data-binding as shown in the help topic below and see of this helps:
http://www.telerik.com/help/aspnet-ajax/grid-advanced-data-binding.html

Regards,
Maria Ilieva
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Saurabh
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or