DimkaNewtown
Freshman
I have a combobox control that is bound to a dataset view. The code works perfectly. (The recordset is an ADO 2.6 Recordset)
My problem is that I want to display a combination of fields (which is determined client-side programmatically) in a format such as "Serial Number - Expiration Date - Model Name".
Now, is there a way to bind the DisplayMember property in such a way? I really don't want to iterate through the entire DataSet manually.
Code:
Recordset rs = new Recordset();
DataSet ds = new DataSet();
OleDbDataAdapter da = new OleDbDataAdapter();
Global.CS.GetAvailableEquipByType( Global.ConnectString, ref rs, ref _EquipmentType );
da.Fill(ds, rs, "EquipmentByType");
cmbEquipment.DataSource = new DataView( ds.Tables[0] );
cmbEquipment.ValueMember = "s_GUID";
cmbEquipment.DisplayMember = "SN";
My problem is that I want to display a combination of fields (which is determined client-side programmatically) in a format such as "Serial Number - Expiration Date - Model Name".
Now, is there a way to bind the DisplayMember property in such a way? I really don't want to iterate through the entire DataSet manually.