Hallo,
Ik heb 2 comboboxen opgevuld met waarden.
Aan elk van deze waarden is een sleutel toegewezen.
Vb A --> Personen
B --> Dieren
C --> Andere
Hoe kan ik nu de sleutels bekomen (dus A, B of C).
Dit is mijn code :
Code:
// fills the main catagories dropdownlist
SQLCmd_cat := mySQLConnection_cat.CreateCommand;
SQLDA_cat := SqlDataAdapter.Create(c_sel_cat, mySQLConnection_cat);
ds_cat := DataSet.Create;
SQLDA_cat.Fill(ds_cat, 'FAQ_Cat_NL');
dt_cat := ds_cat.Tables['FAQ_Cat_NL'];
DropDownList1.DataSource := dt_cat.DefaultView;
DropDownList1.DataTextField := 'cat_info';
DropDownList1.DataValueField := 'cat_type';
DropDownList1.AutoPostBack := true;
Hier heb ik dus het veld cat_type nodig van de gekozen waarde in de combobox.
Alvast bedankt
Lainkes
Bookmarks