Hojoformo
asked on
Repeater - Adding a default selected value to a drop down list bow.
I have a repeater control with a drop down list box and I want to insert a record into the drop down list called "---Please Select -". How can I insert this row to the drop down list box.
for (int i=0;i<dtJobOrderDetails.Ro ws.Count;i ++)
{
Control m_Installed = m_LineItem.Items[i].FindCo ntrol("m_I nstalled") ;
m_Installed.???? = "---Please Select -"; --- ????? Need help????
}
<asp:DropDownList ID="m_InstallType" DataValueField="INSTALLTYP EID" DataTextField="INSTALLTYPE CODE" DataSource='<%# GetInstallType() %>' SelectedIndex='<%# GetSelectedIndex(Convert.T oString(Da taBinder.E val(Contai ner.DataIt em,"INSTAL LTYPEID")) ) %>' runat="server" CssClass="SmallInputDropDo wn"></asp: DropDownLi st>
for (int i=0;i<dtJobOrderDetails.Ro
{
Control m_Installed = m_LineItem.Items[i].FindCo
m_Installed.???? = "---Please Select -"; --- ????? Need help????
}
<asp:DropDownList ID="m_InstallType" DataValueField="INSTALLTYP
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
DropDown1.Items.Insert(0,n
--Nauman.