I have a VB application that's about 95% done. As usual, it's that last 5% that's got me stymied. The program is a Bill-of-material update program that interfaces with an SAP database. The BOM's relate to custom computer configurations. By the nature of a BOM, there are many lines, with many fields to each line. The program uses a DataGridView control to present the data. It is currently working ok with manually-keyed input. However, to make it user-friendly, it needs to use ComboBox dropdowns for the various selections. Therefore, several of the DataGridView columns need to include a combo box. This is where my problem lies.
Specifically, I have two issues: (1) getting the combo-box to populate from an SQL statement, and (2) getting subsequent combo-boxes on the same line to tailor their content based on the previous combo-box. To illustrate the second issue, if the first combo-box says that this particular row deals with data storage for the computer, then the only items that should be included in the second combo box would be those that are disk drives. Obviously, the selection and content of a control on one BOM line will be completely different from those on other rows.
I am able to dynamically load a standalone ComboBox, by setting the Display, Value, and DataSource (which returns a table) properties. However, I can't seem to accomplish this when the ComboBox is embedded in a DataGridView control.
Any help would be greatly appreciated.
Dave
Specifically, I have two issues: (1) getting the combo-box to populate from an SQL statement, and (2) getting subsequent combo-boxes on the same line to tailor their content based on the previous combo-box. To illustrate the second issue, if the first combo-box says that this particular row deals with data storage for the computer, then the only items that should be included in the second combo box would be those that are disk drives. Obviously, the selection and content of a control on one BOM line will be completely different from those on other rows.
I am able to dynamically load a standalone ComboBox, by setting the Display, Value, and DataSource (which returns a table) properties. However, I can't seem to accomplish this when the ComboBox is embedded in a DataGridView control.
Any help would be greatly appreciated.
Dave
Comment