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

Failure by creating structure programatically

1 Answer 42 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Andrej
Top achievements
Rank 1
Andrej asked on 04 May 2011, 04:44 PM

I found one problem when I am creating ribbon structure by code. If I first fill group with buttons and afterwards add Group to tab, buttons dont have correct reference to tab or ribbon and page rendering fails.

RibbonBarTab tab = new RibbonBarTab();
  
RibbonBarGroup group = new RibbonBarGroup();
  
RibbonBarButton button1 = new RibbonBarButton();
group.Items.Add(button1);
  
RibbonBarButton button2 = new RibbonBarButton();
group.Items.Add(button2);
  
tab.Groups.Add(group);
  
ribbon.Tabs.Add(tab);

This works correctly:
RibbonBarTab tab = new RibbonBarTab();
ribbon.Tabs.Add(tab);
  
RibbonBarGroup group = new RibbonBarGroup();
tab.Groups.Add(group);
  
RibbonBarButton button1 = new RibbonBarButton();
group.Items.Add(button1);
  
RibbonBarButton button2 = new RibbonBarButton();
group.Items.Add(button2);



1 Answer, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 09 May 2011, 04:53 PM
Hello Andrej,

I was not able to reproduce the problems you experience.
Please, post a complete example which will reproduce the issues.


Regards,
Nikolay Tsenkov
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
RibbonBar
Asked by
Andrej
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
Share this question
or