T
trint
I have an app that I have been using this code to fill a datagrid:
DataSet ds = new DataSet("Recordset");
OleDbDataAdapter da = new OleDbDataAdapter();
// Call data adapter's Fill method to fill data from ADO
// Recordset to ADO.NET dataset
da.Fill(ds, rs, "tblTravelEventType");
// Assign data set to grid control
DropDownList1.DataSource = ds;
DropDownList1.DataMember = "tblTravelEventType";
But now I want to assign just one of the fields to the combobox1..
How can I do that? Can you give me an example?
Thanks,
Trint
DataSet ds = new DataSet("Recordset");
OleDbDataAdapter da = new OleDbDataAdapter();
// Call data adapter's Fill method to fill data from ADO
// Recordset to ADO.NET dataset
da.Fill(ds, rs, "tblTravelEventType");
// Assign data set to grid control
DropDownList1.DataSource = ds;
DropDownList1.DataMember = "tblTravelEventType";
But now I want to assign just one of the fields to the combobox1..
How can I do that? Can you give me an example?
Thanks,
Trint