|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DropDown First ItemHi, i have this code
cboHoraIni.DataValueField = "COD_HORARIO"; cboHoraIni.DataTextField = "DSC_HORARIO"; cboHoraIni.DataSource = objAgenda.SEL_HORARIO(); //thats a ICollection method cboHoraIni.DataBind(); cboHoraIni.Items.Add("--Selecione um horário--"); cboHoraIni.Items[cboHoraIni.Items.Count-1].Selected=true; But i want the item that i added manually as the first item, before the binded! How can i do that ? Thanks Use Insert instead of Add. Insert allows you to specify the position in the
list. -Brock DevelopMentor http://staff.develop.com/ballen Show quoteHide quote > Hi, i have this code > cboHoraIni.DataValueField = "COD HORARIO"; > cboHoraIni.DataTextField = "DSC HORARIO"; > cboHoraIni.DataSource = objAgenda.SEL HORARIO(); //thats a ICollection > method > cboHoraIni.DataBind(); > cboHoraIni.Items.Add("--Selecione um horário--"); > cboHoraIni.Items[cboHoraIni.Items.Count-1].Selected=true; > But i want the item that i added manually as the first item, before > the binded! > > How can i do that ? > > Thanks >
Other interesting topics
Code-Behind Pain in the Behind!
Best way to disable a site? Is there server control that you load with HTML from a URL Two DropDownLists getting crossed Firefox Validation Issue - not the standard document.[all] problem! validating Server.MapPath from a vb class Getting more detailed errors How to hide aspx from URL in address bar Trying to wire up dropdownlist in datagrid |
|||||||||||||||||||||||