A
Andreas
I've got a problem.
How can I fill down a drop-down box with data from code.
1.I've got a drop-down box in a repeating table. How can I programmatically
fill down this box with data received fromm SQL so the user in could change
value manually. This data is subtracted from the SQL datasource according to
the value from another drop-down box.
This is the test code sample how can I add data. I neen an idea what tools I
have to use :
XPath of my box is :
"/my:myFields/my:table/my:group2/my:name"
root = _senderObject.MainDataSource.CreateNavigator();
try
{
root.MoveToChild("myFields", root.NamespaceURI);
root.MoveToChild("table", root.NamespaceURI);
root.MoveToChild("group2", root.NamespaceURI);
root.MoveToChild("name", root.NamespaceURI);
XmlWriter writer = root.AppendChild();
writer.WriteStartElement("my", "name",
"http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-10-12T06:46:39");
writer.WriteString("New data");
writer.WriteEndElement();
writer.Close(); //Here I receive a mistake.
}
But this doesn't work.
2. How can I extract xml schema from xsn. file?
Thank you!!!
How can I fill down a drop-down box with data from code.
1.I've got a drop-down box in a repeating table. How can I programmatically
fill down this box with data received fromm SQL so the user in could change
value manually. This data is subtracted from the SQL datasource according to
the value from another drop-down box.
This is the test code sample how can I add data. I neen an idea what tools I
have to use :
XPath of my box is :
"/my:myFields/my:table/my:group2/my:name"
root = _senderObject.MainDataSource.CreateNavigator();
try
{
root.MoveToChild("myFields", root.NamespaceURI);
root.MoveToChild("table", root.NamespaceURI);
root.MoveToChild("group2", root.NamespaceURI);
root.MoveToChild("name", root.NamespaceURI);
XmlWriter writer = root.AppendChild();
writer.WriteStartElement("my", "name",
"http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-10-12T06:46:39");
writer.WriteString("New data");
writer.WriteEndElement();
writer.Close(); //Here I receive a mistake.
}
But this doesn't work.
2. How can I extract xml schema from xsn. file?
Thank you!!!