We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Referring to ComboBox created in a DataGrid column

Hi All, I''m pretty new to vb.net but am managing to find my feet ok. I created a ComboBox column style according to the FAQ''s 5.9 and 5.39 which I find extremely useful. I have a form which consists of a "header section", containing a number of ComboBoxes and Text fields. There is also a datagrid which I am using for a "Detail" section where I can maintain order lines associated with the "header section". One of the columns in the datagrid contains a ComboBox control (as implemented from the FAQS). One of the combo boxes in the "header section" contains a list of suppliers. When this value changes in the header section, I would like to refresh the data in the ComboBox column in the datagrid. I am unsure as to how I reference the combobox inside the datagrid. The datagrid has been given the name dgrPOOrderLines. The DataGridColumn was defined as in the faq using the following Syntax: Dim ComboTextCol = New DataGridTextCombo.DataGridComboBoxColumn(New DataGridTextBoxCombo.ComboValueChanged(AddressOf MyComboValueChanged) I am using a loop manually to add the records to the ComboBox although this could be done using databinding quite easily. (This is because I am combining two fields for the values in the combobox). After populating the data, I add the table style to the datagrid which then displays the column as a Combobox as required. I would be grateful if anyone could help me by telling me how I refer back to this column so I can refresh the data of this combo box accordingly. Regards in Advance

Loader.
Live Chat Icon For mobile
Up arrow icon