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

bold items in control

1 Answer 94 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
k
Top achievements
Rank 1
k asked on 02 Aug 2008, 03:33 PM
can your wonderful combobox show some items with bold style? how can i use it?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 04 Aug 2008, 07:31 AM
Hello Conrad,

Check out the following code snippet to set the font of some items to bold.

cs:
 protected void RadComboBox2_ItemDataBound(object sender, RadComboBoxItemEventArgs e) 
    { 
        if (e.Item is RadComboBoxItem) 
        { 
            RadComboBoxItem comboitem=(RadComboBoxItem)e.Item; 
            string strtxt = comboitem.Text; 
            if (strtxt == "Text") 
            { 
                comboitem.Font.Bold = true
            } 
        } 
    } 

Thanks
Princy.
Tags
ComboBox
Asked by
k
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or