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

RibbonBar - new Tab(client side)

1 Answer 78 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Lubomir
Top achievements
Rank 1
Lubomir asked on 24 Sep 2012, 11:44 AM
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>


1 Answer, 1 is accepted

Sort by
0
Ivan Zhekov
Telerik team
answered on 26 Sep 2012, 08:35 AM
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.
Tags
RibbonBar
Asked by
Lubomir
Top achievements
Rank 1
Answers by
Ivan Zhekov
Telerik team
Share this question
or