Updating Controls during an Ajax Request that originates within a user web control

2 posts, 0 answers
  1. Mr.
    Mr. avatar
    2 posts
    Member since:
    May 2005

    Posted 03 Jan 2012 Link to this post

    Hello.  Here is my situation. 

    1.  I have a webform named CUSTOMERS.ASPX, it has an AJAX PROXY CONTROL ON IT.  It uses a master page named default.master that has the it has an AJAX CONTROL MANAGER CONTROL on it.

    2. This web form (CUSTOMERS.ASPX) has a radTabStrip on it

    3. This web form (CUSTOMERS.ASPX) has a radMultipage on it (that is NOT hooked to the tabstrip to switch pageview when tab is clicked)

    4. On one of the pageviews of the radmultipage, there is a custom control (GRID.ASCX) it has an ID of grdAllCustomers.

    5.  The GRID.ASCX contains a radgrid control on it and an also has AJAX PROXY control on it.  The radgrid is set to autopostback on rowclick.  I use the item_command event to capture rowclicks server side.

    when I click a row in the radgrid (which in the GRID.ASCX control), it fires the item_command event in that control.  I then raise that event using raiseevent so that it raises it in the customers.aspx page.  This works, but when I try to change the active tab of the radtab control (which is inside the customers.aspx page), the tab control does not update.

    It is strange that in the ajax proxy control on the customers.aspx page, I cannot see the grdAllCustomers custom control.  I would think that I would need to ajaxify the grdAllCustomers control in the customers.aspx page (using the ajax proxy).  But the control is not there.  If i try to ajaxify the control manually by setting up the control in the ajax proxy in the HTML markup but then i get a javascript error.

    Am i missing something?  The custom control and the content page and the master page are all blended together into a single page, so the ajax should work and I should be able update the controls during the ajax partial postback - right? 

  2. Tsvetina
    Tsvetina avatar
    2481 posts

    Posted 05 Jan 2012 Link to this post


    One option is to directly add a setting in the aspx page where the tab strip and multipage are updating:
        <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
                <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
        <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
                <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />

    This is also a recommended approach if you want a child control in the tabstrip to update it on postback.

    This way, on any postback action in the tabstrip/multipage, the whole tabstrip structure gets refresed via AJAX.

    All the best,
    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