Grid Insert Refresh other control

2 posts, 0 answers
  1. Allan
    Allan avatar
    121 posts
    Member since:
    Jun 2008

    Posted 28 Feb 2012 Link to this post

    I am not sure this should actually be here in Grid or Ajax manager. I have a Grid and an Ajax manager control. I insert into the grid and, as expected, the whole page does not refresh yet the grid does. (Very Nice).

    Now I have run into an issue where I have had to add a SQLDataSource and FormView on the page that needs to be updated after the insert into the Grid. I can force the page to refresh and have the FormView update but this sort of defeats the purpose of using the Ajax control to prevent a full page refresh.

    I have tried to have the SQLDataSource and FormView refresh using both the Gridss ItemInserted and/or the Grid's SQLDataSource Inserted to force a rebind of the FormView. Niether worked.

    Is there a way to have the FormView rebind/refresh after the Grid Insert has occured?

    Here is my AJAX code:

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript" language="javascript">
            function refreshGrid(arg) {
                if (!arg) {
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
                }
            }
        </script>
    </telerik:RadCodeBlock>


    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
             <telerik:AjaxSetting AjaxControlID="RadCodeBlock1">
                 <UpdatedControls>
                     <telerik:AjaxUpdatedControl ControlID="rgd_Labor" UpdatePanelHeight="" />
                     <telerik:AjaxUpdatedControl ControlID="rgd_Materials" UpdatePanelHeight="" />
                 </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
        </telerik:RadAjaxManager>







  2. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 29 Feb 2012 Link to this post

    Hello Allan,

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
             <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                 <UpdatedControls>
                     <telerik:AjaxUpdatedControl ControlID="rgd_Labor"  />
                     <telerik:AjaxUpdatedControl ControlID="rgd_Materials" />
                 </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
        </telerik:RadAjaxManager>


    Let me know if any concern.


    Thanks,
    Jayesh Goyani
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top