Automatic width of RadRibbonBar

2 posts, 0 answers
  1. WolveFred
    WolveFred avatar
    4 posts
    Member since:
    Sep 2011

    Posted 30 Dec 2011 Link to this post

    Hi !

    I would like to create a RibbonBar dynamically, so I don't know the required width in advance.

    Is it possible to set an automatic width for the RadRibbonBar and how ?

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 01 Jan 2012 Link to this post


    Try the following code snippet and set automatic width by CSS as shown.
    protected void Page_Load(object sender, EventArgs e)
           RadRibbonBar rbnbr = new RadRibbonBar();
           rbnbr.ID = "RadRibbonBar1";
           RibbonBarTab tb = new RibbonBarTab();
           tb.Text = "Home";
           rbnbr.CssClass = "abc";
    <style type="text/css">
          background:Red !important;
          width:auto !important;

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