I have created a a windows form with vs2015 using vb/net where the user can add tabpages on which the user can add datagridviews for entering simulation data. If needed, the user can choose to add comboboxcells to the datagridviews through a contextmenu.
After closing the windows form the created tabs and datagridviews etc. are stored in a xml document for the next startup.
On the next startup the controls are created again and previously entered data is loaded into the datagridviews.
This works fine so far. Tabs are created. Datagridviews are created and the content is loaded into the datagridviews from the .xml-file.
The only problem is, that the comboboxcells do not show up again. They are created but it seems that they do not show up if I add them to a datagridview before the datagridview is visible.
Dim combocell As New DataGridViewComboBoxCell 'define comboboxcell
combocell.Items.Add(s) 'add some items to the combocell
mydgv.Rows(iii).Cells(ii) = combocell
This only works if the Datagridview mydgv is visible. So it doesn't work for the DGVs on other tabpages that are not visible at that moment. Any idea why that is?