I created the radribbonbar programmatically using the trial dll.
But when add the bouhgt dll by the company, the code doesn't work.
for example:
this is my aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack) CreateMenu();
}
private void CreateMenu()
{
RadRibbonBar menu = new RadRibbonBar();
menu.ID = "Menu";
RibbonBarTab tab1 = new RibbonBarTab();
tab1.ID = "Tab1";
tab1.Text = "Tab1";
RibbonBarGroup group1 = new RibbonBarGroup();
group1.ID = "group1";
RibbonBarButton btn = new RibbonBarButton();
btn.ID = "btn";
btn.Text = "btn";
group1.Items.Add(btn);
btn = new RibbonBarButton();
btn.ID = "btn1";
btn.Text = "btn1";
group1.Items.Add(btn);
tab1.Groups.Add(group1);
menu.Tabs.Add(tab1);
tab1 = new RibbonBarTab();
tab1.ID = "Tab2";
tab1.Text = "Tab1";
group1 = new RibbonBarGroup();
group1.ID = "group21";
group1.Text = "group2";
btn = new RibbonBarButton();
btn.ID = "btn1";
btn.Text = "btn1";
group1.Items.Add(btn);
tab1.Groups.Add(group1);
menu.Tabs.Add(tab1);
tab1 = new RibbonBarTab();
tab1.ID = "Tab3";
tab1.Text = "Tab1";
group1 = new RibbonBarGroup();
group1.ID = "group3";
tab1.Groups.Add(group1);
menu.Tabs.Add(tab1);
tab1 = new RibbonBarTab();
tab1.ID = "Tab4";
tab1.Text = "Tab1";
group1 = new RibbonBarGroup();
group1.ID = "group4";
tab1.Groups.Add(group1);
menu.Tabs.Add(tab1);
header.Controls.Add(menu);
}
aspx:
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
<Scripts>
<%--Needed for JavaScript IntelliSense in VS2010--%>
<%--For VS2008 replace RadScriptManager with ScriptManager--%>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
</Scripts>
</telerik:RadScriptManager>
<script type="text/javascript">
//Put your JavaScript code here.
</script>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
</telerik:RadAjaxManager>
<div>
<div id="header" runat="server">
</div>
</div>
</form>
js error:
attach 1 and 2
How I can fix this
thanks
But when add the bouhgt dll by the company, the code doesn't work.
for example:
this is my aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack) CreateMenu();
}
private void CreateMenu()
{
RadRibbonBar menu = new RadRibbonBar();
menu.ID = "Menu";
RibbonBarTab tab1 = new RibbonBarTab();
tab1.ID = "Tab1";
tab1.Text = "Tab1";
RibbonBarGroup group1 = new RibbonBarGroup();
group1.ID = "group1";
RibbonBarButton btn = new RibbonBarButton();
btn.ID = "btn";
btn.Text = "btn";
group1.Items.Add(btn);
btn = new RibbonBarButton();
btn.ID = "btn1";
btn.Text = "btn1";
group1.Items.Add(btn);
tab1.Groups.Add(group1);
menu.Tabs.Add(tab1);
tab1 = new RibbonBarTab();
tab1.ID = "Tab2";
tab1.Text = "Tab1";
group1 = new RibbonBarGroup();
group1.ID = "group21";
group1.Text = "group2";
btn = new RibbonBarButton();
btn.ID = "btn1";
btn.Text = "btn1";
group1.Items.Add(btn);
tab1.Groups.Add(group1);
menu.Tabs.Add(tab1);
tab1 = new RibbonBarTab();
tab1.ID = "Tab3";
tab1.Text = "Tab1";
group1 = new RibbonBarGroup();
group1.ID = "group3";
tab1.Groups.Add(group1);
menu.Tabs.Add(tab1);
tab1 = new RibbonBarTab();
tab1.ID = "Tab4";
tab1.Text = "Tab1";
group1 = new RibbonBarGroup();
group1.ID = "group4";
tab1.Groups.Add(group1);
menu.Tabs.Add(tab1);
header.Controls.Add(menu);
}
aspx:
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
<Scripts>
<%--Needed for JavaScript IntelliSense in VS2010--%>
<%--For VS2008 replace RadScriptManager with ScriptManager--%>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
</Scripts>
</telerik:RadScriptManager>
<script type="text/javascript">
//Put your JavaScript code here.
</script>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
</telerik:RadAjaxManager>
<div>
<div id="header" runat="server">
</div>
</div>
</form>
js error:
attach 1 and 2
How I can fix this
thanks