I have a RadMenu created in a code-behind, with these properties (among others):
NavMenu.EnableAutoScroll = true;
NavMenu.EnableScreenBoundaryDetection = true;
NavMenu.Width = Unit.Percentage(99);
I set the Width to 99% to enable the menu scroll arrows when the browser window is resized. Menu items are added through code, instead of markup.
The issue I want to fix is that the menu covers the width of the client area, regardless of the number of menu items. I'd like for the menu to be sized to just the width of the items, but still have the menu scroll arrows. My application's menu is configured based on licensing and security, and so the number of menu items varies widely.
Thanks!
| <telerik:GridTemplateColumn UniqueName="Unit" HeaderText="<%$ Resources:resources, Label_HomeDirectory %>"> |
| <ItemTemplate> |
| <asp:Label ID="labelUnit" runat="server" Text=""></asp:Label> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| protected void radGridUsers_ItemDataBound(object sender, GridItemEventArgs e) |
| { |
| GridDataItem gridItem; |
| User user; |
| if (e.Item is GridDataItem) |
| { |
| gridItem = (GridDataItem)e.Item; |
| user = (User)gridItem.DataItem; |
| Label labelUnit = (Label)gridItem.FindControl("labelUnit"); |
| labelUnit.Text = UnitService.GetParentUnits(user.Unit.ID) + user.Unit.Name; |
| } |
| } |
<
telerik:RadComboBox runat="server" AppendDataBoundItems="true" >
<Items>
<telerik:RadComboBoxItem Text="Select" Value="" />
</Items>
</telerik:RadComboBox>
This works fine when I am using databound items to append to the drop down. I have come to scenario where I need to just use some static items in my control page. ie
<telerik:RadComboBox ID="Arrangement" runat="server">
<Items>
<telerik:RadComboBoxItem Text="Service Contract" Value="Service Contract" />
<telerik:RadComboBoxItem Text="Contract" Value="Contract" />
</Items>
</telerik:RadComboBox>
I would like to return a result as
>Select
>Service Contract
>Contract
problem is that when I use the <items> tag in my skin file, I can't use it again in my code page.
Is there some other default value I can so as to avoid an empty drop down box on all my pages. I like seeing select as the default vs blank or the first items in lists.
mac
| <telerik:RadComboBox ID="cmbCategoria" |
| runat="server" |
| DataSourceID="odsCategoria" |
| DataValueField="Id" |
| DataTextField="Descrizione" |
| AppendDataBoundItems="true" |
| SelectedValue='<%# Bind("IdCategoria") %>'> |
| <Items> |
| <telerik:RadComboBoxItem Value="XXX" /> |
| </Items> |
| </telerik:RadComboBox> |