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

[Solved] Paging is not working when grid is used in UserControl.

1 Answer 113 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Akki
Top achievements
Rank 1
Akki asked on 12 May 2013, 03:52 PM

Hi
I have placed a Radgrid inside a UserControl with below code.

<asp:ScriptManager ID="rdMgr" runat="server">
</asp:ScriptManager>
<telerik:RadAjaxManager ID="radAMgr" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="rdGrdInbox">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rdGrdInbox" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<div>
    <telerik:RadGrid ID="rdGrdInbox" runat="server" AllowFilteringByColumn="True" AllowSorting="True"
        AllowPaging="True" CellSpacing="0" GridLines="None" AutoGenerateColumns="False"
        PageSize="15" Width="100%" OnItemCommand="grdCommonInbox_Command" Style="width: 100% !important;">
        <%--OnItemCommand="rdGrdInbox_ItemCommand" --%>
        <MasterTableView DataKeyNames="grant_id">
            <Columns>
                <telerik:GridBoundColumn DataField="therapeutic_area" SortExpression="therapeutic_area"
                    HeaderText="Functional Area" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="budget_type" SortExpression="budget_type" HeaderText="Budget Type"
                    Visible="false">
                    <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Left" Width="0%"></ItemStyle>
                </telerik:GridBoundColumn>
  </Columns>
        </MasterTableView>
        <GroupingSettings CaseSensitive="false" />
    </telerik:RadGrid>

Now i ham using this userControl in some other aspx., now if i try to navigate to 2nd page. Even though i am using scriptmanager in second page.. Paging is not working. Anything i am doing wrong ???

Regards,
Kiran

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 13 May 2013, 05:09 AM
Hi Akki,

I tried your code and paging is working fine at my end. Try not using ScriptManager in both UserControl and the main page where UserControl is used. One suggestion is to use ScriptManagerProxy in UserControl and ScriptManager in the ASPX page. Please elaborate the scenario for more help. Please take a look into this help documantation.

Thanks,
Princy.
Tags
Grid
Asked by
Akki
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or