RadAjaxManager not refreshing grid when called from custom user control

2 posts, 0 answers
  1. Jitin
    Jitin avatar
    4 posts
    Member since:
    Feb 2015

    Posted 12 Jun 2015 Link to this post


    Hi all, I have a radgrid that triggers an opening of a radwindow which is inside of a user control. This user control handles the update and insertion of data and then closes to refresh the grid. However, everything seems to work fine except for refreshing the grid, and I can't seem to figure out why.

     Here is the main page:

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Silk">
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" ClientEvents-OnResponseEnd="responseEnd">
            <telerik:AjaxSetting AjaxControlID="telerik">
                    <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1"/>
                    <telerik:AjaxUpdatedControl ControlID="telerik" />
                    <telerik:AjaxUpdatedControl ControlID="contactEditor" />
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
        <telerik:RadGrid runat="server" ID="telerik" AutoGenerateColumns="False" OnNeedDataSource="telerik_OnNeedDataSource"      OnInsertCommand="telerik_OnInsertCommand"
            OnUpdateCommand="telerik_OnUpdateCommand" OnItemDataBound="telerik_OnItemDataBound" GroupingSettings-CaseSensitive="False" OnItemCommand="telerik_OnItemCommand">
            <MasterTableView DataKeyNames="PRIMARY_KEY">
                    <telerik:GridButtonColumn ButtonType="ImageButton" Text="E" CommandName="Edit2" HeaderText="Edit"/>
                    <%-- My other columns to display --%>
            <ClientSettings Resizing-AllowColumnResize="True" Scrolling-AllowScroll="True" Selecting-AllowRowSelect="True" ClientEvents-OnPopUpShowing="PopUpShowing" />
        <icl:ContactEditor runat="server" ID="contactEditor" OnCommitedEvent="contactEditor_OnCommitedEvent"/>

    ​Here is the user control:

    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ContactEditor.ascx.cs" Inherits="ICL_V2.controls.ContactEditor" %>
    <telerik:RadWindow ID="radwindow" runat="server" MinWidth="600px" AutoSize="True" DestroyOnClose="True" Behaviors="Move,Resize, Close">
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
                <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
                        <telerik:AjaxSetting AjaxControlID="btnCommit" />
                <div class="form-template">
                        <%-- My textbox's and dropdowns --%>
                    <asp:Button ID="btnCommit" runat="server" class="form-cmd-button" ValidationGroup="form" OnClick="btnCommit_OnClick" />

    ​When btnCommit is pressed, the corresponding db update/insert is done and then the event OnCommittedEvent is triggered to refresh the grid. The end of the btn click event:



    And then back in the main page

    protected void contactEditor_OnCommitedEvent(object sender, EventArgs e)


    This all works without any ajax enabled, but when the ajax is enabled everything works except for the grid refresh at the end. Can anyone point me in the right direction here?



  2. Maria Ilieva
    Maria Ilieva avatar
    4017 posts

    Posted 15 Jun 2015 Link to this post

    Hello Jitin,

    I would suggest you to perform manual Ajax request for updating the Grid as demonstrated in the online demo below:

    I hope this helps.

    Maria Ilieva
    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 Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top