I am very new at this so, sorry if this is very basic.
I got a rad grid for all my employees and am trying to have a Race, Sex and Classification drop down box to populate the data.
Is there a way to do that right in the editor?
Do I just replace my bound fields with the dropdownboxes and enter the list of available choices somewhere?
I can not seem to find a way to do this?
Thanks
Matt
I got a rad grid for all my employees and am trying to have a Race, Sex and Classification drop down box to populate the data.
Is there a way to do that right in the editor?
Do I just replace my bound fields with the dropdownboxes and enter the list of available choices somewhere?
I can not seem to find a way to do this?
Thanks
Matt
3 Answers, 1 is accepted
0

Jayesh Goyani
Top achievements
Rank 2
answered on 05 Jul 2012, 05:46 PM
Hello,
Please check below links.
ComboBox / Multi-column ComboBox
ComboBox / Custom Attributes
Thanks,
Jayesh Goyani
Please check below links.
ComboBox / Multi-column ComboBox
ComboBox / Custom Attributes
Thanks,
Jayesh Goyani
0

Dave
Top achievements
Rank 1
answered on 05 Jul 2012, 08:57 PM
I got this piece from that, but I need something very basic.......
My datafield is emp_Sex and I need a drop down for Male and Female
Then I got another one for Race and another one for Classification
Teh code below looks way to confusing.
<telerik:RadComboBox ID="RadComboBox_AvatarSelection"
runat="server"
Width="220px"
HighlightTemplatedItems="True"
Skin="Black"
CssClass="qsfexAlignedInput">
<ItemTemplate>
<!-- ImageClassName, Popularity and Artist are custom attributues of the items.
You can add as many as you wish. -->
<div class="<%# DataBinder.Eval(Container, "Attributes['ImageClassName']") %>">
<span class="qsfexAvatarContainer"></span>
<span class="qsfexField">Popularity: <%# DataBinder.Eval(Container, "Attributes['Popularity']")%></span>
<span class="qsfexField">Artist: <%# DataBinder.Eval(Container, "Attributes['Artist']")%></span>
</div>
</ItemTemplate>
<Items>
<telerik:RadComboBoxItem
ImageClassName="qsfexGeeky"
Popularity="358"
Artist="Jone Larragne"
Text="Geeky">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem
ImageClassName="qsfexGirly"
Popularity="1,005"
Artist="Jone Larragne"
Text="Girly">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem
ImageClassName="qsfexGrumpy"
Popularity="1,345"
Artist="Jone Larragne"
Text="Grumpy">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem
ImageClassName="qsfexGroovie"
Popularity="2,043"
Artist="Jone Larragne"
Text="Groovie">
</telerik:RadComboBoxItem>
</Items>
</telerik:RadComboBox>
My datafield is emp_Sex and I need a drop down for Male and Female
Then I got another one for Race and another one for Classification
Teh code below looks way to confusing.
<telerik:RadComboBox ID="RadComboBox_AvatarSelection"
runat="server"
Width="220px"
HighlightTemplatedItems="True"
Skin="Black"
CssClass="qsfexAlignedInput">
<ItemTemplate>
<!-- ImageClassName, Popularity and Artist are custom attributues of the items.
You can add as many as you wish. -->
<div class="<%# DataBinder.Eval(Container, "Attributes['ImageClassName']") %>">
<span class="qsfexAvatarContainer"></span>
<span class="qsfexField">Popularity: <%# DataBinder.Eval(Container, "Attributes['Popularity']")%></span>
<span class="qsfexField">Artist: <%# DataBinder.Eval(Container, "Attributes['Artist']")%></span>
</div>
</ItemTemplate>
<Items>
<telerik:RadComboBoxItem
ImageClassName="qsfexGeeky"
Popularity="358"
Artist="Jone Larragne"
Text="Geeky">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem
ImageClassName="qsfexGirly"
Popularity="1,005"
Artist="Jone Larragne"
Text="Girly">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem
ImageClassName="qsfexGrumpy"
Popularity="1,345"
Artist="Jone Larragne"
Text="Grumpy">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem
ImageClassName="qsfexGroovie"
Popularity="2,043"
Artist="Jone Larragne"
Text="Groovie">
</telerik:RadComboBoxItem>
</Items>
</telerik:RadComboBox>
0
Hello Matt,
Could you please elaborate some more on the issue? Where exactly do you want to place the requested comboboxes:
- in the edit form
- or in the filtering item
Of course you could fill the combobox with your custom items without declaring additional SQL:
- Design time:
- Code-behind:
- Or:
If this is not you are looking for, please provide us additional detail as well as some screenshots of the desired behavior. Thus, we will be able to figure out what exactly you have in mind and suggest a proper approach.
Regards,
Eyup
the Telerik team
Could you please elaborate some more on the issue? Where exactly do you want to place the requested comboboxes:
- in the edit form
- or in the filtering item
Of course you could fill the combobox with your custom items without declaring additional SQL:
- Design time:
<
telerik:RadComboBox
ID
=
"RadComboBox1"
runat
=
"server"
>
<
Items
>
<
telerik:RadComboBoxItem
Text
=
"Male"
Value
=
"m"
/>
<
telerik:RadComboBoxItem
Text
=
"Female"
Value
=
"f"
/>
</
Items
>
</
telerik:RadComboBox
>
RadComboBox RadComboBox1=
new
RadComboBox();
string
[] sexOptions = {
"Male"
,
"Female"
};
RadComboBox1.DataSource = sexOptions;
RadComboBox1.DataBind();
RadComboBox comboBox =
new
RadComboBox();
RadComboBoxItem mItem =
new
RadComboBoxItem(
"Male"
,
"m"
);
RadComboBoxItem fItem =
new
RadComboBoxItem(
"Female"
,
"f"
);
comboBox.Items.Add(mItem);
comboBox.Items.Add(fItem);
If this is not you are looking for, please provide us additional detail as well as some screenshots of the desired behavior. Thus, we will be able to figure out what exactly you have in mind and suggest a proper approach.
Regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.