|124355||Jun 3,2016 03:43 AM UTC||Jun 14,2016 04:57 AM UTC||WinForms||7|
Dim oSourceColl As New StringCollection
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
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)
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
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
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!!!
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.