RibbonBar - new Tab(client side)

2 posts, 0 answers
  1. Lubomir
    Lubomir  avatar
    15 posts
    Member since:
    Sep 2012

    Posted 24 Sep 2012 Link to this post

    Hello,
    how can I add from javascript new Tab + RibbonBarButton?(client side)

    such as

    var ribbonbar = $find("<%= RadRibbonBar1.ClientID %>");
    ***** var newTab = new ribbonar. TAB
    newTab.setText = tabText;
    var newButton = new ribbonbar.Button
    newButton .setText = buttonText;
    newButton .ImageUrl = image.jpgURL
    newButton.AddTo(newTab);
    _____________________________________________________________________________________
    <telerik:RadRibbonBar ID="RadRibbonBar1" runat="server" Width="100%"
            Skin="Office2007" EnableMinimizing="true" >
            <telerik:RibbonBarTab Text="Tab1">
            <telerik:RibbonBarGroup Text="Buttons">
                        <Items>
                            <telerik:RibbonBarButton Size="Large" Text="Button1" />
                        </Items>
                    </telerik:RibbonBarGroup>
            </telerik:RibbonBarTab>
        </telerik:RadRibbonBar>
    i want to add new tab from javascript with buttons:
    <telerik:RibbonBarTab Text="Tab2">
            <telerik:RibbonBarGroup Text="ButtonsGroup2">
                        <Items>
                            <telerik:RibbonBarButton Size="Large" Text="ButtonFromTab2" />
                        </Items>
                    </telerik:RibbonBarGroup>
            </telerik:RibbonBarTab>


  2. Ivan Zhekov
    Admin
    Ivan Zhekov avatar
    540 posts

    Posted 26 Sep 2012 Link to this post

    Hello, Lubo.

    The Ribbon API, as of now, is not sufficient to achieve the requested scenario. True, with the API alone you can create the client side objects that correspond to the HTML, but you need to create the HTML by your self, which is not an easy task.

    I have logged an issue in our internal system to improve the Ribbon API to allow for such scenarios.

    Regards,
    Ivan Zhekov
    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. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top