P
Paul
I would like to load multiple rows of default data from an xml file which has
been setup as a data source. I have created the repeating section and
assigned the fields in the section to the corresponding field in the
secondary data source. When the form is previewed only the first row of data
is displayed. If I insert a new row, i get the first record as default data
again. I will not always know how many rows will be in the default data that
i want to load.
I have been able to figure out how to read the data I need form the
secondary data source during the FormEvents_Loading event using the following
code:
Dim rootDefaultData As XPathNavigator =
Me.DataSources("DefaultData").CreateNavigator()
Dim nodeDefaultData As XPathNodeIterator =
rootDefaultData.Select("/Document/PPlan/PD/Doc", NamespaceManager)
While nodeDefaultData.MoveNext()
Dim Title As String =
nodeDefaultData.Current.SelectSingleNode("Title", NamespaceManager).Value
Dim Description As String =
nodeDefaultData.Current.SelectSingleNode("Description",
NamespaceManager).Value
MessageBox.Show(Title & " = " & Description)
End While
I cannot figure out how to move those fields into the main data source or
the repeating section. The repeating section contains two text fields of the
same name. From what I have been able to figure out, the repeating section is
not available in this event so I will have to load the data into the main
data source.
Any help with this problem is appriecated.
been setup as a data source. I have created the repeating section and
assigned the fields in the section to the corresponding field in the
secondary data source. When the form is previewed only the first row of data
is displayed. If I insert a new row, i get the first record as default data
again. I will not always know how many rows will be in the default data that
i want to load.
I have been able to figure out how to read the data I need form the
secondary data source during the FormEvents_Loading event using the following
code:
Dim rootDefaultData As XPathNavigator =
Me.DataSources("DefaultData").CreateNavigator()
Dim nodeDefaultData As XPathNodeIterator =
rootDefaultData.Select("/Document/PPlan/PD/Doc", NamespaceManager)
While nodeDefaultData.MoveNext()
Dim Title As String =
nodeDefaultData.Current.SelectSingleNode("Title", NamespaceManager).Value
Dim Description As String =
nodeDefaultData.Current.SelectSingleNode("Description",
NamespaceManager).Value
MessageBox.Show(Title & " = " & Description)
End While
I cannot figure out how to move those fields into the main data source or
the repeating section. The repeating section contains two text fields of the
same name. From what I have been able to figure out, the repeating section is
not available in this event so I will have to load the data into the main
data source.
Any help with this problem is appriecated.