Dim oSourceColl As New StringCollection
oSourceColl.Add("A")
oSourceColl.Add("B")
oSourceColl.Add("C")
GridGroupingControl1.TableDescriptor.Columns(1).Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.ComboBox
GridGroupingControl1.TableDescriptor.Columns(1).Appearance.AnyRecordFieldCell.ChoiceList = oSourceColl
GridGroupingControl1.TableDescriptor.Columns(2).Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.GridListControl
GridGroupingControl1.TableDescriptor.Columns(2).Appearance.AnyRecordFieldCell.ValueMember = "Sno"
GridGroupingControl1.TableDescriptor.Columns(2).Appearance.AnyRecordFieldCell.DisplayMember = "Sno"
'DATASOURCE FILLED IN LOAD EVENT
DS1TableAdapter1.Fill(MyDataSet.DS1)
DS2TableAdapter1.Fill(MyDataSet.DS2)
DS3TableAdapter1.Fill(MyDataSet.DS3)
Everything works perfectly fine on my winform, on the cbo2_click event
If cbo1.Text = "A" Then
cbo2.DataSource = New DataView(MyDataSet.DS1)
ElseIf cbo1.Text = "B" Then
cbo2.DataSource = New DataView(MyDataSet.DS2)
ElseIf cbo1.Text = "C" Then
cbo2.DataSource = New DataView(MyDataSet.DS3)
End if
but when It comes to the GGC, I cannot get a dynamic datasource on cbo2, depending on that particular value of cbo1 on that row. Please let me know what I should do, and what event I should call
Thanks!
AddHandler GridGroupingControl1.TableControl.CurrentCellCloseDropDown, AddressOf TableControl_CurrentCellCloseDropDown
Now, I don't know if I have to open a new thread, but I am trying to call a value from the GGC combo having the dynamic datasource, and report it to a textbox. In a normal winform combobox, I would use :
Private Sub odoc_SelectionChangeCommitted(sender As Object, e As EventArgs) Handles odoc.SelectionChangeCommitted
dim cbo as multicolumnCombobox = odoc
dim txtBox as string = cbo.SelectedItem.row.itemarray(1).ToString
End Sub
where the integer represents the column value of the combo datasource. You should know that my datasource is not limited to a displaymember and a valuemember, I have queries with more than 2 columns
I tried to dig in the sender and e librairy for the 3 events you have suggested with no luck to find the equivalent.
For instance, in your datagrid example, if I select the value "a" in categoryID, there are 2 columns shown : "Number", "Word". Upon selection is committed in the GGC combo, I would like to be able to use : dim txtBox as string = ....(0)... returning the column "0" value OR ...(3)... returning the Column "3" value, for the selected row.
Thank you in advance!!!
Nicolas