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

RadGrid pagenumbers causing postback

1 Answer 77 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
John asked on 05 Sep 2013, 07:35 PM

I have a radgrid on my page which has page numbers enabled. I am using Ajax Rad Manager for stopping postback. However, its not working which I click the page numbers of the grid. When I click the grid it is making a postback and loading the grid again.

Can someone tell me how to stop the page numbers from loading whole page?

Please let me know if you have any questions.


1 Answer, 1 is accepted

Sort by
Top achievements
Rank 1
answered on 06 Sep 2013, 10:53 AM
Hi John,

As for RadGrid operations such as paging, I am afraid you cannot prevent the grid from doing a post-back or an ajax request as it needs to rebind itself in order for those operations to be completed. You can use ajax to achieve a seamless updating of the user interface by wrapping the grid in a RadAjaxPanel or using the RadAjaxManager control. Please check the following sample code i tried.

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
    <telerik:RadGrid ID="RadGrid1" runat="server"
        AllowPaging="True" Width="97%" DataSourceID="SqlDataSource1">
        <PagerStyle Mode="NumericPages"></PagerStyle>
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="EmployeeID" ClientDataKeyNames="EmployeeID"
            Width="100%" CommandItemDisplay="Top" PageSize="5">
                <telerik:GridBoundColumn DataField="EmployeeID" HeaderText="EmployeeID" ReadOnly="True"
                    SortExpression="EmployeeID" UniqueName="EmployeeID">
                <telerik:GridBoundColumn DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName"
                <telerik:GridBoundColumn DataField="LastName" HeaderText="LastName" SortExpression="LastName"
                <telerik:GridBoundColumn DataField="Title" HeaderText="Title" SortExpression="Title"
                <telerik:GridTemplateColumn UniqueName="TemplateEditColumn">
                        <asp:HyperLink ID="EditLink" runat="server" Text="Edit"></asp:HyperLink>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString35 %>"
    SelectCommand="SELECT [EmployeeID], [FirstName], [LastName], [Title] FROM [Employees]">

General Discussions
Asked by
Top achievements
Rank 1
Answers by
Top achievements
Rank 1
Share this question