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

Webusercontrol and Radajaxmanager

3 Answers 66 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Luki
Top achievements
Rank 1
Luki asked on 11 Nov 2012, 04:02 PM
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?

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 15 Nov 2012, 08:59 AM
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.
0
Luki
Top achievements
Rank 1
answered on 15 Nov 2012, 11:08 AM
Hi, thanks for your response.
Unfortunately the behavior is the same as before.

Any other suggestions?

thx, Lukas
0
Maria Ilieva
Telerik team
answered on 20 Nov 2012, 12:20 PM
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.
Tags
General Discussions
Asked by
Luki
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Luki
Top achievements
Rank 1
Share this question
or