Hello,
I am Not able to get RadComboBox selected item(s) from withing RadGrid template cell,
My requirement is to check, if the default value is selected(this can be 'Please Select' or anything), prompt the user with an alert message suggesting to select another valid value.
FYI I am not able use logic to get the combo box as under, since the tag it renders is a table within div
combo = gridElement.getElementsByTagName("???"); /*what tag I can use to find the combo within grid*/
Please suggest.
Regards,
Nhilesh Baua
There are two ways to use the attached skins as external non-embedded skins:
ASP.NET Themes
This method is useful if you need to use the skin for all controls of a specific type in the whole web application.
You need to:
1. change the <pages> declaration in your web.config to <pages
theme="SkinName"> e.g.
<pages theme="Gray">
2. add the following lines to the <appSettings> section of your web.config:
<add key="Telerik.EnableEmbeddedBaseStylesheet" value="false" />
<add key="Telerik.EnableEmbeddedSkins" value="false" />
<add key="Telerik.Skin" value="SkinName"/>
e.g.
<add key="Telerik.Skin" value="Gray"/>
3. create an ASP.NET Theme, named SkinName and add the following all files and folders from the archive:
Skins/ControlName.css (note that not all controls have such a file)
Skins/SkinName/*
e.g.
Skins/Menu.css
Skins/Gray/Menu.Gray.css
Skins/Gray/Menu/*.*
Direct skin registration
This method is useful if you have fewer instances of a given control in your website.
You need to:
1. set the Skin property accordingly
2. set the EnableEmbeddedSkins and the EnableEmbeddedBaseStylesheet properties to false
3. register the skin file using the following CSS:
<link rel="stylesheet" type="text/css" href="~/Skins/ControlName.css" runat="server " />
<link rel="stylesheet"
type="text/css" href="~/Skins/SkinName/Menu.SkinName.css" runat="server" />
e.g.
<link rel="stylesheet" type="text/css" href="~/Skins/ Menu.css" runat="server" />
<link rel="stylesheet" type="text/css" href="~/Skins/Gray/Menu. Gray.css" runat="server"/>
(note that not all controls have a ControlName.css file)
Further documentation related to skin usage is available at:| <telerik:RadComboBox ID="RadComboBox1" runat="server" Width="300px" Skin="Web20" |
| EmptyMessage="Choose layout..." AutoPostBack="true" HighlightTemplatedItems="True" |
| OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged" |
| AllowCustomText="true" > |
| <ItemTemplate> |
| <img src='<%# DataBinder.Eval(Container, "Attributes['ImagePath']") %>' alt=""/> |
| </ItemTemplate> |
| <Items> |
| <telerik:RadComboBoxItem ImagePath="../Grafica/Layout1.png" Value="Layout1"></telerik:RadComboBoxItem> |
| <telerik:RadComboBoxItem ImagePath="../Grafica/Layout2.png" Value="Layout2"></telerik:RadComboBoxItem> |
| <telerik:RadComboBoxItem ImagePath="../Grafica/Layout3.png" Value="Layout3"></telerik:RadComboBoxItem> |
| <telerik:RadComboBoxItem ImagePath="../Grafica/Layout4.png" Value="Layout4"></telerik:RadComboBoxItem> |
| <telerik:RadComboBoxItem ImagePath="../Grafica/Layout5.png" Value="Layout5"></telerik:RadComboBoxItem> |
| <telerik:RadComboBoxItem ImagePath="../Grafica/Layout6.png" Value="Layout6"></telerik:RadComboBoxItem> |
| </Items> |
| </telerik:RadComboBox> |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if (!Page.IsPostBack) |
| { |
| for (int i = 0; i < RadComboBox1.Items.Count; i++) |
| { |
| RadComboBox1.Items[i].DataBind(); |
| } |
| } |
| } |
| protected void RadComboBox1_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e) |
| { |
| string strSelectedValue = RadComboBox1.SelectedValue; |
| // other stuff |
| } |