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

Paging causes postback when grid setup for client bound data

3 Answers 137 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 04 Jan 2015, 05:21 AM
The grid loads fine using my JSON data source but when I click the paging buttons or page numbers it causes a postback of the page rather than firing a client command event as expected. I dont see a disable postback property.

Here are the relevant information. Its a very simple test.

    <telerik:RadGrid runat="server" ID="RadGrid1" AutoGenerateColumns="False" GroupPanelPosition="Top" Skin="Office2007" EnableViewState="false">
        <MasterTableView AllowCustomPaging="True" AllowPaging="True" PagerStyle-AlwaysVisible="True" PageSize="10">
            <RowIndicatorColumn Visible="False">
            </RowIndicatorColumn>
            <ExpandCollapseColumn Created="True">
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="ID" HeaderText="ID">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text=""></ModelErrorMessage>
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Name" HeaderText="Name">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text=""></ModelErrorMessage>
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Status" HeaderText="Status">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text=""></ModelErrorMessage>
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Owner" HeaderText="Owner">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text=""></ModelErrorMessage>
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings>
            <Selecting AllowRowSelect="True" EnableDragToSelectRows="False" />
            <ClientEvents OnDataBound="dataBound" />
            <ClientEvents OnCommand="RadGrid1_Command" />
        </ClientSettings>
    </telerik:RadGrid>

Thanks

Brian

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 07 Jan 2015, 08:02 AM
Hi Brian,

When using client-side paging your data provider's method should return only records for the current page not the entire dataset. Please review this online demo for working example of this functionality.

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.

 
0
Brian
Top achievements
Rank 1
answered on 07 Jan 2015, 03:47 PM
Thanks for the reply. So basically I think the grid does not support client side paging natively and you are relying on RadAjaxLoadingPanel to absorb the post back from looking at the example? I will play with it and see if I am correct.

Brian
0
Maria Ilieva
Telerik team
answered on 12 Jan 2015, 12:38 PM
Hi,

You can bind the grid to a RadClientDataSource as demonstrated here in which case all operations will be automatically handled on the client.

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
Brian
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Brian
Top achievements
Rank 1
Share this question
or