Ciao a tutti, qualcuno potrebbe aiutarmi per completare il codice ?
Public Function Manufacturers(ID)
Dim da As New MySQLDataAdapter
Dim ds As New DataSet
da.SelectCommand = New MySQLCommand("SELECT manufacturers_id, manufacturers_name FROM manufacturers ORDER BY manufacturers_name", DBConn)
ds.Clear()
da.Fill(ds, "manufacturers")
Me.CheckedListBox1.DataSource = ds.Tables("manufacturers")
Me.CheckedListBox1.DisplayMember = "manufacturers_name"
Me.CheckedListBox1.ValueMember = "manufacturers_id"
End Function
Il mio problema è definire come selected l'elemento della CheckedListBox1 il cui valore (ValueMember) è = ad ID
Le ho provate tutte ma, causa la poca dimestichezza con .net non mi riesce di capire qual'è l'istruzione corretta.
Grazie 1000

Rispondi quotando