I am binding my ddl in an asp.net gridview (VS 2005)
<ItemTemplate>
<asp:DropDownList ID="ddlCertificateTypeID" Selectedvalue='<%# Eval("CertificateTypeID")%>' runat="server" DataSource='<%# CertificateTypes() %>'
DataTextField="CertificateType" DataValueField="CertificateTypeID" Enabled="false" >
</asp:DropDownList>
.
.
.
Public ReadOnly Property CertificateTypes() As CertificateTypeCollection
'
' All Certificate Types
'
Get
Dim certColl As CertificateTypeCollection
certColl = CertificateTypeEntity.GetCertificateTypeCollection
Return certColl
End Get
End Property
I now want to add a "[No value selected yet]" to the top of the dropdownlist that corresponds to null in the backend database.
I have done this before, when I am dealing with just one dropdown on a form.
Const COMBO_NULL As String = "[No value selected yet]"
...
ddlStatus1.DataSource = PsStatusEntity.GetStatusCollection
ddlStatus1.DataValueField = PsStatusFieldIndex.StatusId.ToString
ddlStatus1.DataTextField = PsStatusFieldIndex.StatusDescr.ToString
ddlStatus1.DataBind()
ddlStatus1.Items.Insert(0, COMBO_NULL)
Can anyone help me do this "for the multiple entries in the datagrid?