i insert a item to the radcombobox by code behind.
<
telerik:RadComboBox
runat
=
"server"
ID
=
"RadComboBox_Project"
EnableOverlay
=
"true"
DataTextField
=
"DisplayName"
DataValueField
=
"ProjectID"
Skin
=
"Sunset"
EnableLoadOnDemand
=
"True"
DataSourceID
=
"ObjectDataSource2"
OnSelectedIndexChanged
=
"RadComboBox_Project_SelectedIndexChanged"
AutoPostBack
=
"True"
HighlightTemplatedItems
=
"true"
Label
=
""
Width
=
"100%"
NoWrap
=
"True"
>
<
HeaderTemplate
>
<
ul
>
<
li
class
=
"col1"
>Project Number | Project Name</
li
>
<%--<
li
class
=
"col2"
></
li
>--%>
</
ul
>
</
HeaderTemplate
>
<
ItemTemplate
>
<
ul
>
<
li
class
=
"col1"
><%# Eval("ProjectNumber") + " | " + Eval("ProjectName")%></
li
>
<%--<
li
class
=
"col2"
><%# Eval("ProjectName") %></
li
>--%>
</
ul
>
</
ItemTemplate
>
<%-- <
Items
>
<
telerik:RadComboBoxItem
Text
=
"Select a Project"
Value
=
"0"
/>
</
Items
>--%>
</
telerik:RadComboBox
>
Code Behind:
Protected Sub RadComboBox_Project_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadComboBox_Project.DataBound
Dim combo As RadComboBox = DirectCast(sender, RadComboBox)
If combo.Items.Count > 1 Then
combo.Items.Insert(0, New RadComboBoxItem("Select a Project", String.Empty))
End If
End Sub
but it display a empty row in the combobox, how to remove it ? thanks