DropDown First Item

  • Thread starter Thread starter Paperback Writer
  • Start date Start date
P

Paperback Writer

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top