Hi,
in C# you can use the attribute Item like this, I think tou can do the
same thing in VB :
Cb.Text =3D Cb.Item[number of the Item you want display].ToString();
BR
Fabien Decret
ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/
merco a =E9crit :
[quoted text, click to view] > Hi, i'm populating a combobox small datas from a Dataset.
> Dim Ds As DataSet
> Ds =3D GetDS("Select * from Utenti")
> Cb.Items.Clear()
> Cb.DataSource =3D Ds.Tables(0)
> Cb.DisplayMember =3D "Descrizione"
> Cb.ValueMember =3D "Codice"
>
> It's a simple "Users" table with ID (codice) and description
> (descrizione).
> Is there a way to pre-select an item by it's code without cycling for
> all items in combobox ?
>
> I've tried , with no success, indexof ,passing only a string type
> parameter (the code)...
>=20
> thanksCb