Multiple options in infopath web browsing

Source: Internet
Author: User
Because infopath web browsing does not provide multiple options, the solution is:

Implement with repeating table

Read the data to be displayed from a data connection and display it in the form of a duplicate table.

Routine:

If (! This. New) return;
Xpathnavigator root = maindatasource. createnavigator ();

Datasource mydatasource = This. datasources ["ds1"];
Xpathnavigator T1 = mydatasource. createnavigator ();
Xpathnodeiterator T2S = t1.select ("DFS: myfields/DFS: datafields/D: ds1", namespacemanager );

Xpathnavigator Options = root. selectsinglenode ("/My: myfields/My: Options", namespacemanager );
Xpathnavigator optionfirst = root. selectsinglenode ("/My: myfields/My: Options/My: Option", namespacemanager );
Xpathnavigator mytext;

Mytext = optionfirst. selectsinglenode ("My: Text", namespacemanager );
String C2;

While (T2S. movenext ())
{
Xpathnavigator myoption = optionfirst. Clone ();
Mytext = myoption. selectsinglenode ("My: Text", namespacemanager );
C2 = T2S. Current. getattribute ("C2 ","");
Mytext. setvalue (C2)
Options. appendchild (myoption );
}
Optionfirst. deleteself ();

Options is a duplicate table and contains two nodes: Selected and text. Selected is Boolean, and text is the text corresponding to multiple selection boxes.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.