G
Geraldine Hobley
Hi,
I need to add a combo box to a data grid, however the
catch is that the datasource for each combo box is
different in each row.
I have added a combo box for a customer column like so
'
we need to have a combo box in the customer column
Dim ComboCustCol As New DataGridComboBoxColumn
ComboCustCol.MappingName
= "Customerindex" 'must be from the grid table...
ComboCustCol.HeaderText = "Customer"
ComboCustCol.Width = 120
'DataView dv = new DataView(myDataSet.Tables
["customerList"], "", "customerID",
DataViewRowState.CurrentRows);
ComboCustCol.ColumnComboBox.DataSource =
dsCurrDataset.Tables!
Customerlist.DefaultView ' .DefaultView 'dv;
ComboCustCol.ColumnComboBox.DisplayMember
= "Companyname"
ComboCustCol.ColumnComboBox.ValueMember
= "customerkey"
This all works but I need another combo box next to it
that takes the value from this combo box and uses it to
select the contacts for this combo box. (i.e. the combo
box on each row has a different datasource. ).
Any ideas or examples of this would be greatly appreciated.
Geraldine.
I need to add a combo box to a data grid, however the
catch is that the datasource for each combo box is
different in each row.
I have added a combo box for a customer column like so
'
we need to have a combo box in the customer column
Dim ComboCustCol As New DataGridComboBoxColumn
ComboCustCol.MappingName
= "Customerindex" 'must be from the grid table...
ComboCustCol.HeaderText = "Customer"
ComboCustCol.Width = 120
'DataView dv = new DataView(myDataSet.Tables
["customerList"], "", "customerID",
DataViewRowState.CurrentRows);
ComboCustCol.ColumnComboBox.DataSource =
dsCurrDataset.Tables!
Customerlist.DefaultView ' .DefaultView 'dv;
ComboCustCol.ColumnComboBox.DisplayMember
= "Companyname"
ComboCustCol.ColumnComboBox.ValueMember
= "customerkey"
This all works but I need another combo box next to it
that takes the value from this combo box and uses it to
select the contacts for this combo box. (i.e. the combo
box on each row has a different datasource. ).
Any ideas or examples of this would be greatly appreciated.
Geraldine.