update radgrid after window close with ajaxmanager in master page

6 posts, 0 answers
  1. sf
    sf avatar
    103 posts
    Member since:
    Apr 2009

    Posted 16 Mar 2011 Link to this post

    hi I want to update a radgrid when my radwindow is closed. This demo suggest to use ajaxmanager in the page, but my ajaxmanager is actually in the master page. In my case is it still possible to update the grid on radwindow close?

    please help
    thanks in advance
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Mar 2011 Link to this post

    Hello,

    Use server-side code block in your JS function to call the master manager AjaxRequest function from the ContentPage.
    ClientSide:
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function myContentClickHandler()
            {
                $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("content");
            }
        </script>
    </telerik:RadCodeBlock>

    Also take a look at the following help article and documentation.
    RadAjax and MasterPage
    Ajax / User Controls/Master pages

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. TippCityTom
    TippCityTom avatar
    14 posts
    Member since:
    Sep 2008

    Posted 19 Feb 2013 Link to this post

    if have RadWindow Manager in MasterPage and call RadWindow from content page where the RadGrid is located, how do you refresh that open grid record when radwindow is closed using the above solution?
  5. Angel Petrov
    Admin
    Angel Petrov avatar
    1006 posts

    Posted 22 Feb 2013 Link to this post

    Hello Thomas,

    I am experiencing difficulties understanding the scenario. Could you please clarify the requirements? If you could show us your markup and code-behind we would be able to give you a more precise answer. Is your scenario similar to the one demonstrated in this demo?

    Since you mentioned a MasterPage ContentPage scenario with AJAX I suggest that you examine the following help articles:

    All the best,
    Angel Petrov
    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.
  6. TippCityTom
    TippCityTom avatar
    14 posts
    Member since:
    Sep 2008

    Posted 22 Feb 2013 Link to this post

    Scenario is:     Have RadAjaxManager in master page.   In content page have RadGrid which user clicks on edit and RadWindow (referenced in Master Page) pops up.  User edits and clicks submit button.   Want to close current window and refresh RadGrid in Content page, but RadAjaxManager and RadWindow are all in Master page.
  7. Angel Petrov
    Admin
    Angel Petrov avatar
    1006 posts

    Posted 27 Feb 2013 Link to this post

    Hi Thomas,

    The easiest way to achieve this is to rebind the grid when the window closes. Generally there should be no problem to ajaxify the controls in the content page. Simply obtain a reference to the ajax manager on the master page and set the grid in the content page to update itself(using programmatic settings). Please go through this help article which should help you achieve this. I strongly suggest that you review the project in attachments which implements this approach.

    Regards,
    Angel Petrov
    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
UI for ASP.NET Ajax is Ready for VS 2017