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

Grid Insert Refresh other control

1 Answer 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Allan
Top achievements
Rank 2
Allan asked on 28 Feb 2012, 06:12 PM
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>







1 Answer, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 29 Feb 2012, 07:24 AM
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
Tags
Grid
Asked by
Allan
Top achievements
Rank 2
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or