Updating RadGrid using Ajax after edits from a User Control are saved

2 posts, 0 answers
  1. Carl
    Carl avatar
    1 posts
    Member since:
    Mar 2011

    Posted 04 Dec 2011 Link to this post


    I have a Master page which looks like:

    <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Main.master.cs" Inherits="Jps.Web.Main" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="jps" TagName="navMenu" Src="Control/Menu/NavigationMenu.ascx" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head runat="server">
        <link rel='stylesheet' type='text/css' href='~/Css/style.css' />
        <script type="text/javascript" src="/js/jquery-1.6.2.min.js"></script>
        <script type="text/javascript" src="/js/jquery-ui-1.8.14.custom.min.js"></script>
        <form id="mainForm" runat="server">
            <telerik:RadScriptManager ID="TelerikScriptManager" runat="server"></telerik:RadScriptManager>
            <telerik:RadAjaxManager ID="TelerikAjaxManager" runat="server"></telerik:RadAjaxManager>
            <!-- menu -->
            <div id="header">
                <jps:navMenu runat="server" id="navMenu" />
            <!-- menu -->
            <div class="content-all">
                <div class="content-left">                
                    <div class="content-body-left">
                        <asp:ContentPlaceHolder ID="cphLeft" runat="server" />  
                <div class="content-right">
                    <div class="content-body-right">
                        <asp:ContentPlaceHolder ID="cphRight" runat="server" /> 

    In the left placeholder, I have a RadGrid.  In the right placeholder I have a user control.
    When a user clicks on a row in the RadGrid, the user control on the right is successfully populated and edits are allowed. 
    I have a "save" button which, when clicked, successfully posts the data to the database.

    Some of that data is displayed in the RadGrid.   However, after changing this data, the grid is not updated.

    In the right placed holder I have a RadAjaxManagerProxy setup like so:

    <!-- Ajax Manager -->
    <telerik:RadAjaxManagerProxy ID="LocationAjaxProxy" runat="server">
            <telerik:AjaxSetting AjaxControlID="LocationList">
                    <telerik:AjaxUpdatedControl ControlID="LocationInformationRadMultiPage" LoadingPanelID="RadAjaxGridLoad" />
            <telerik:AjaxSetting AjaxControlID="LocationInformationRadMultiPage">
                    <telerik:AjaxUpdatedControl ControlID="LocationList" LoadingPanelID="RadAjaxGridLoad" />
    <!-- Ajax Manager -->

    LocationList is the RadGrid.  The LocationInformationRadMultiPage is a RadTabStrip that contains the user control that allows editing and saving of the data.

    Is this the correct approach?


  2. Antonio Stoilkov
    Antonio Stoilkov avatar
    530 posts

    Posted 07 Dec 2011 Link to this post

    Hi Carl,

    I have examined your code and everything seems fine. You could check if you are calling the grid to rebind in the save click event so it can update the information appropriately. Additionally, you could try and debug your scenario by removing the ajaxifing of the controls and see if this causes the issue.

    All the best,
    Antonio Stoilkov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top