T
Tore Gylver
I have a Windows client with an MDI parent form and a
number of MDI child forms. Data for a number of
comboboxes throughout my windows client are collected
from web services at startup. This results in some read
only datasets in my MDI parent form.
The problem is that I cannot figure out how my comboboxes
can make use of the datasets in the parent form.
Here is one piece of code for a child form I have tried
without success:
FormMenu is the MDI parent form
DS_OrdergetStates is a dataset in FormMenu that is PUBLIC
Dataview1 is a local dataview in the child form
ComboStateOfOrders is the local combobox in the child form
Dim FormM As New FormMenu
DataView1.Table = FormM.DS_OrderGetStates1.Tables
("PN_States")
With ComboStateOfOrders
.DataSource = DataView1
.DisplayMember = "StateName"
.ValueMember = "StateCode"
End With
Resulting number of rows in combobox is always 0.
I have tested without a local dataview, and I have also
tried to establish a method to copy dataset from the
parent form to the child form, always with 0 rows in the
combobox as result. However, it looks like the dataset
schema is available in the child form.
Regards
Tore
number of MDI child forms. Data for a number of
comboboxes throughout my windows client are collected
from web services at startup. This results in some read
only datasets in my MDI parent form.
The problem is that I cannot figure out how my comboboxes
can make use of the datasets in the parent form.
Here is one piece of code for a child form I have tried
without success:
FormMenu is the MDI parent form
DS_OrdergetStates is a dataset in FormMenu that is PUBLIC
Dataview1 is a local dataview in the child form
ComboStateOfOrders is the local combobox in the child form
Dim FormM As New FormMenu
DataView1.Table = FormM.DS_OrderGetStates1.Tables
("PN_States")
With ComboStateOfOrders
.DataSource = DataView1
.DisplayMember = "StateName"
.ValueMember = "StateCode"
End With
Resulting number of rows in combobox is always 0.
I have tested without a local dataview, and I have also
tried to establish a method to copy dataset from the
parent form to the child form, always with 0 rows in the
combobox as result. However, it looks like the dataset
schema is available in the child form.
Regards
Tore