Webusercontrol and Radajaxmanager

4 posts, 0 answers
  1. Luki
    Luki avatar
    5 posts
    Member since:
    Jun 2012

    Posted 11 Nov 2012 Link to this post

    Hi,
    I have a Masterpage.
    Inside this Masterpage is a Contentpage which has a Radajaxmanager and a Tabstrip + MultipageView.
    For each Multipage a Webusercontrol which has Radgrid is loaded dynamically (onclick of Tabstrip).

    What i want to achieve is, that if a particular Button in the Radgrid (which resides in the Webusercontrol) is clicked,
    the Tab changes and shows the Grid of another Webusercontrol.

    Until now, everything works fine. Except that the Tab is not changing. (The Multipage changes, and the other Grid is shown, but the selected tab remains).

    If i set enableajax of Ragajaxmanager to false, it works as expected.

    Here is some of my Code:
     
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server"
        Skin="Default">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest"  EnableAJAX="true" >
        <AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="rtsGostTab">
                <UpdatedControls>
                      
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="rtsGostTab" />
                </UpdatedControls>
            </telerik:AjaxSetting>
         <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
     
     
     <telerik:RadTabStrip ID="rtsGostTab" SelectedIndex="0" CssClass="tabStrip"
                     runat="server" MultiPageID="RadMultiPage1" Skin="Office2010Blue" OnTabClick="RadTabStrip1_TabClick" Orientation="HorizontalTop">
                 </telerik:RadTabStrip>
                 <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage1_PageViewCreated" CssClass="multiPage">
                 </telerik:RadMultiPage>

    As I said, in the Webusercontrol is a simple Grid, so i tried following in the Code behind.
    void GostGrid_ItemCreated(object sender, GridItemEventArgs e)
    {
        if ((e.Item) is GridDataItem)
        {
            GridDataItem item = (GridDataItem)e.Item;
            LinkButton btn = (LinkButton)item["Perspective"].FindControl("lbtnPerspective");
            RadAjaxManager AjaxManager = RadAjaxManager.GetCurrent(Page);
            AjaxManager.AjaxSettings.AddAjaxSetting(btn, this.Page.Master.FindControl("MainContentPlaceHolder").FindControl("rtsGostTab"), null);
        }
    }

    I expected, that if I click on the Linkbutton, the Tabstrip updates too (as it does if i set enableajax to false).

    Has anybody an advise?
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 15 Nov 2012 Link to this post

    Hi Likas,

    Please try adding a setting in which the RadMultiPage updates the RadTabStrip also, like this:
    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest"  EnableAJAX="true" >
        <AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="rtsGostTab">
                <UpdatedControls>
                     <telerik:AjaxUpdatedControl ControlID="rtsGostTab" /> 
                     <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" />
                               </UpdatedControls>
            </telerik:AjaxSetting>
         <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rtsGostTab" />
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    Give this a try and let me know if it helps.

    All the best,
    Maria Ilieva
    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.
  3. Luki
    Luki avatar
    5 posts
    Member since:
    Jun 2012

    Posted 15 Nov 2012 Link to this post

    Hi, thanks for your response.
    Unfortunately the behavior is the same as before.

    Any other suggestions?

    thx, Lukas
  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 20 Nov 2012 Link to this post

    Hello Lukas,

    In this case it will be best if you could open a regular support ticket and send us sample runnable application which demonstrates the exact issue you are facing. Thus we will be able to replicate it locally and do our best to provide a proper approach for your specific case.

    Regards,
    Maria Ilieva
    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