How-To Question: Control that starts AJAX Request is on Master, but Control that will be updated is on another Page

3 posts, 0 answers
  1. Mallory
    Mallory avatar
    13 posts
    Member since:
    Mar 2010

    Posted 09 Mar 2010 Link to this post

    Hey everyone

    I have the following scenario: The Master page contains a RadAjaxManager (ID = ajaxMgr) and a RadTreeView (ID = treeView). On another page, namely Default.aspx a RadGrid (ID = radGrid) is placed. The treeView will start the AJAX request and the radGrid is the control that will be updated. My question here is, on which page do I add the AJAX setting: on the Master page (using a base class or something else) or on the Default.aspx page (using ((MasterPage)Master).AjaxMgr.AjaxSettings.AddAjaxSettings(((MasterPage)Master).TreeView, radGrid) )? Does a Telerik control exist, that does solve this kind of situation? Or what is your best practice in this scenario? 

    I'm looking forward to your answers. Thanks.

    Regards,
    Mallory
  2. robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 09 Mar 2010 Link to this post

    I believe this help article should be of use to you.


    Ignore the code they show for the master page, since I doubt it applies to your situation, and look at the content page code. You just need to get the TreeView control from the master page and then create an AjaxSetting that updates the grid control in your content page.

    I hope that helps.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mallory
    Mallory avatar
    13 posts
    Member since:
    Mar 2010

    Posted 10 Mar 2010 Link to this post

    Hi robertw102

    Thanks for your reply and the link. The linked approach looks good, but it looks like there's no optimal solution to my scenario. I thought to ask this question, because I always get a specific error (see this forum post of mine describing the problem) if I work with ((MasterPage)Master).AjaxMgr.AjaxSettings.AddAjaxSettings(((MasterPage)Master).TreeView, radGrid) . The thing is that the RadTreeView has to be displayed on every content page. If I place the RadTreeView on each content page (a content page in my case also contains the RadGrid), the problem disappears, but another arises: I have to duplicate the RadTreeView (which remains the same over all content pages) on all the content pages, and that's actually not that beautiful. This question only arised because of the abovementione (and linked) problem I'm having right now with the AjaxManager. Long story short, I'm going to give the linked approach a try and see if it solves my problem. Again, thanks for your reply.

    Regards,
    Mallory
Back to Top