Failure by creating structure programatically

2 posts, 0 answers
  1. Andrej
    Andrej avatar
    5 posts
    Member since:
    Sep 2008

    Posted 04 May 2011 Link to this post

    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);



  2. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 09 May 2011 Link to this post

    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.

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top