This is a migrated thread and some comments may be shown as answers.

SelectedIndexChanged

1 Answer 38 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Kjell
Top achievements
Rank 1
Iron
Kjell asked on 05 Jun 2015, 01:58 PM

How set the first item in my RadComboBox font.bold = true when i call "RadComboBox1_SelectedIndexChanged"?

I dont now what the RadComboBoxItem have text or value. Load dynamic....

Only that i want server side set the first item font bold to true, but first when i call SelectedIndexChanged

 

1 Answer, 1 is accepted

Sort by
0
Aneliya Petkova
Telerik team
answered on 08 Jun 2015, 10:27 AM
Hi Kjell,

Please try the following code:

.aspx:
<telerik:RadComboBox ID="RadComboBox1" runat="server" EmptyMessage="Select Office Versions"
    DropDownAutoWidth="Enabled" AutoPostBack="true"
    OnItemDataBound="ComboBoxItemBound"
    OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged">
</telerik:RadComboBox>

OnSelectedIndexChanged handler:
protected void RadComboBox1_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
    RadComboBox1.Items[0].Font.Bold = true;
}

Here you may find a video showing how this example works at my side.

Hope this will be helpful.

Regards,
Aneliya Petkova
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ComboBox
Asked by
Kjell
Top achievements
Rank 1
Iron
Answers by
Aneliya Petkova
Telerik team
Share this question
or