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

Paging not working

3 Answers 103 Views
Grid
This is a migrated thread and some comments may be shown as answers.
zach davis
Top achievements
Rank 1
zach davis asked on 21 Jun 2010, 10:52 PM
hello everyone,

I am working with the radgrid and I have issue where paging is not working.  Let me be more specific: set page size isn't working and going to individual pages using the "go" button isn't working. 

I have tried everything i can think of.

<telerik:RadAjaxPanel runat="server" ID="rapResource" LoadingPanelID="ralpResource"
    <telerik:RadGrid ID="rgResourceList" runat="server" AllowPaging="true" PageSize="15" > 
        <MasterTableView AutoGenerateColumns="false" PageSize="15" AllowPaging="true"
            <Columns> 
                <telerik:GridTemplateColumn UniqueName="JobLinks" HeaderText="" /> 
                <telerik:GridTemplateColumn UniqueName="Tech" HeaderText="Technician" /> 
                <telerik:GridTemplateColumn UniqueName="Program" HeaderText="Program" Visible="false" /> 
                <telerik:GridTemplateColumn UniqueName="JobNumber" HeaderText="JobNumber" Visible="false" /> 
                <telerik:GridTemplateColumn UniqueName="ETA" HeaderText="ETA" /> 
                <telerik:GridTemplateColumn UniqueName="ETC" HeaderText="ETC" /> 
                <telerik:GridTemplateColumn UniqueName="Phone" HeaderText="Phone" /> 
                <telerik:GridTemplateColumn UniqueName="City" HeaderText="City" Visible="false" /> 
                <telerik:GridTemplateColumn UniqueName="State" HeaderText="State" Visible="false" /> 
                <telerik:GridTemplateColumn UniqueName="WorkOrder" HeaderText="WorkOrder"
                    <ItemTemplate> 
                        <asp:ImageButton runat="server" ID="ibtnPrint" ImageUrl="~/Images/iconPrint.png" 
                            AlternateText="" ToolTip="Print Work Order" /> 
                        <asp:ImageButton runat="server" ID="ibtnEmail" ImageUrl="~/Images/iconEmail.gif" 
                            AlternateText="" ToolTip="Email Work Order" /> 
                        <asp:ImageButton runat="server" ID="ibtnEmailAttach" ImageUrl="~/Images/iconEmailAttach.gif" 
                            AlternateText="" ToolTip="Email as Attachment" /> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
            </Columns> 
        </MasterTableView> 
    </telerik:RadGrid> 
</telerik:RadAjaxPanel> 
<telerik:RadAjaxLoadingPanel runat="server" ID="ralResource" /> 

Any help would be greatly appreciated....

Thanks,

-zd



3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 22 Jun 2010, 05:24 AM
Hello Zach,

I think you are using Simple Data-binding. If you choose simple data-binding, you will need to assign data-source and rebind the grid after each operation (paging, sorting, editing, etc.) That means here in your case, you need to rebind the grid in PageIndexChanged event.

A better approach  would be using Advanced Data-binding by attaching NeedDataSource event. RadGrid fires the NeedDataSource event each time it needs to be bound to a data source. You can refer the following Demo which includes paging in Advanced Data Binding.
Grid / Advanced Data Binding.

Hope this information helps you,
Princy.
0
zach davis
Top achievements
Rank 1
answered on 08 Nov 2010, 06:28 PM
Princy,

I realize this response is belated.  I just got back around to working on this issue.  The advanced databinding method isn't working either.  This control is somewhat nested.  I am wondering if order of events have something to do with it.  Any other help would be greatly appreciated.

Thanks,
-zd
0
Radoslav
Telerik team
answered on 10 Nov 2010, 04:38 PM
Hi Zach,

Could you please verify that you create and bound the RadGrid as is shown in the following online example:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/needdatasource/defaultcs.aspx
Also it will be helpful if you post your RadGrid declaration and the related code behind code. In that way we can understand the logic of your application and provide you with more to-the-point answer.
Looking forward for your reply.

Greetings,
Radoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
zach davis
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
zach davis
Top achievements
Rank 1
Radoslav
Telerik team
Share this question
or