Community & Support
Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Tabstrip > RadToolBar on MultiPage
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Not answered RadToolBar on MultiPage

Feed from this thread
  • Control_Freq avatar

    Posted on Apr 18, 2007 (permalink)

    Hi,
    I have a tabstrip with 3 tabs. Also 3 multipages. On each multipage is a RadToolbar.
    When I click on a tab the multipage changes and the appropriate RadToolBar is displayed.
    But, when I change the multipage programattically, using:

    RadTabStrip1.SelectedIndex = 1;

    RadMultiPage1.SelectedIndex = 1;

    The multipage changes but the RadToolBar is not displayed.
    I have tried ToolBar1.Visible =true; but that doesn't work.

    So, the toolbar is only displayed when the multipage is changed through use of clicking the tabs.

    I have other telerik controls on the mltipages and they seem to display OK. It's just the RadToolBar which is showing this problem.

    Please Help

  • Paul Paul admin's avatar

    Posted on Apr 18, 2007 (permalink)

    Hello Control_Freq,

    We tried to reproduce the reported issue, but to no avail. Here's a sample code snippet that demonstrates the needed approach.

    ASPX:
    <form id="form1" runat="server">  
        <radTS:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1">  
            <Tabs> 
                <radTS:Tab runat="server" Text="Root Tab 1">  
                </radTS:Tab> 
                <radTS:Tab runat="server" Text="Root Tab 2">  
                </radTS:Tab> 
            </Tabs> 
        </radTS:RadTabStrip> 
        <radTS:RadMultiPage ID="RadMultiPage1" runat="server" Height="136px" Width="337px">  
            <radTS:PageView ID="PageView1" runat="server">  
                PageView1<br /> 
                <radTlb:RadToolbar ID="RadToolbar1" runat="server">  
                    <Items> 
                        <radTlb:RadToolbarButton AccessKey="n" ToolTip="New (Alt+N)" CommandName="New" /> 
                        <radTlb:RadToolbarButton AccessKey="o" ToolTip="Open (Alt+O)" CommandName="Open" /> 
                        <radTlb:RadToolbarButton AccessKey="s" ToolTip="Save (Alt+S)" CommandName="Save" /> 
                    </Items> 
                </radTlb:RadToolbar> 
            </radTS:PageView> 
            <radTS:PageView ID="PageView2" runat="server" Width="100%">  
                PageView2<br /> 
                <radTlb:RadToolbar ID="RadToolbar2" runat="server">  
                    <Items> 
                        <radTlb:RadToolbarButton AccessKey="n" ToolTip="New (Alt+N)" CommandName="New" /> 
                        <radTlb:RadToolbarButton AccessKey="o" ToolTip="Open (Alt+O)" CommandName="Open" /> 
                    </Items> 
                </radTlb:RadToolbar> 
            </radTS:PageView> 
        </radTS:RadMultiPage> 
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Select Tab1" /> 
        <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Select Tab2" /> 
    </form> 

    Code-behind:
    using System;  
    using System.Data;  
    using System.Configuration;  
    using System.Collections;  
    using System.Web;  
    using System.Web.Security;  
    using System.Web.UI;  
    using System.Web.UI.WebControls;  
    using System.Web.UI.WebControls.WebParts;  
    using System.Web.UI.HtmlControls;  
    using Telerik.WebControls;  
     
    public partial class _Default : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
     
        }  
          
        protected void Button1_Click(object sender, EventArgs e)  
        {  
            RadTabStrip1.SelectedIndex = 0;  
            RadMultiPage1.SelectedIndex = 0;  
        }  
        protected void Button2_Click(object sender, EventArgs e)  
        {  
            RadTabStrip1.SelectedIndex = 1;  
            RadMultiPage1.SelectedIndex = 1;  
        }  
    }  
     

    Give it a try and let us know what is different in your code.

    Best wishes,
    Paul
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center

  • Control_Freq avatar

    Posted on Apr 18, 2007 (permalink)

    Ah,
    Well, I was populating the RadToolbar programmatically. The buttons change according to the context.
    So, If you just drop a RadToolBar on the aspx page, and create the buttons in code-behind does it still work for you?

    I agree that your example works, but I can't easily define the buttons in the toolbar statically. I need to do it in code-behind.

    Regards

  • Paul Paul admin's avatar

    Posted on Apr 19, 2007 (permalink)

    Hello Control_Freq,

    Please find attached a sample web application that demonstrates the needed approach.

    Sincerely yours,
    Paul
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center
    Attached files

  • Control_Freq avatar

    Posted on Apr 22, 2007 (permalink)

    It doesn't compile.

    I get:
    Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

    Any more suggestions?

  • surfer Master avatar

    Posted on Apr 22, 2007 (permalink)

    This assembly is from MS AJAX Extensions for ASP.NET (previously known as Atlas). As far as I can tell, MS AJAX is not needed in this example, so just delete the following line from the web.config file.

    <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    (or you can delete web.config altogether)

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Tabstrip > RadToolBar on MultiPage