This is a migrated thread and some comments may be shown as answers.
RAdRibbonbar in InnerHTML
1 Answer 16 Views
This is a migrated thread and some comments may be shown as answers.
July
Top achievements
Rank 2
July asked on 01 Jul 2011, 06:01 PM
I'm testing demo version.
I need do this...

          menuString = null;

          menuString = menuString +
                       "<telerik:RadRibbonBar ID=\"RadRibbonBar1\" runat=\"server\" Style=\"width: 100%\" Skin=\"Vista\"" +
                       " SelectedTabIndex=\"0\">" +
                       "<telerik:RibbonBarGroup Text=\"Search\">" +
                       "<telerik:RibbonBarGroup EnableLauncher=\"true\" Width=\"100%\" Text=\"Document navigation\">" +
                       "<Items>" +
                       "<telerik:RibbonBarButton Size=\"Large\" Text=\"First\" ToolTip=\"First Document\" Width=\"50px\"" +
                       "ImageUrlLarge=\"Images/resultset_first.png\" />" +
                       "<telerik:RibbonBarButton Size=\"Large\" Text=\"Previous\" ToolTip=\"Previous Document\"" +
                       "Width=\"50px\" ImageUrlLarge=\"Images/resultset_previous.png\" />" +
                       "<telerik:RibbonBarButton Size=\"Large\" Text=\"Next\" ToolTip=\"Next Document\" Width=\"50px\"" +
                       "ImageUrlLarge=\"Images/resultset_next.png\" />" +
                       "</Items>" +
                       "</telerik:RibbonBarGroup>" +
                       "</telerik:RibbonBarGroup>" +
                       "</telerik:RadRibbonBar>";

    myDiv.innerHTML = menuString ;

MyDiv is a Div in page.aspx.

The problem is that RadRibbonBar doesn't show in page, but exist in code behind when see generate code of aspx.

What is the problem?

1 Answer, 1 is accepted

Sort by
0
July
Top achievements
Rank 2
answered on 05 Jul 2011, 06:19 PM
I found the solution doing this:

        System.Web.UI.HtmlControls.HtmlGenericControl dynDiv = new System.Web.UI.HtmlControls.HtmlGenericControl("DIV");
          dynDiv.ID = "HeaderDiv";
          dynDiv.Style.Add(HtmlTextWriterStyle.Width, Unit.Percentage(100).ToString());
         
          dynDiv.Controls.Add(menu);

           return dynDiv;

here menu is a RadRibbonBar
Tags
Menu
Asked by
July
Top achievements
Rank 2
Answers by
July
Top achievements
Rank 2
Share this question
or