• Infopath web浏览中的多项选择功能


    因为Infopath web浏览没有提供多项选择功能,如果需要这个功能,解决方案是:

    Repeating Table来实现

    从某个数据连接中读出要显示的数据,然后用重复表的形式显示出来。

    例程:

    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是重复表,包含两个节点:selected和text,selected是布尔型,text是多选框对应的文字

  • 相关阅读:
    ZZ
    Qt5获取网卡/IP等信息
    platforms
    [转]如何使用VS 2013發布一個可以在Windows XP中獨立運行的可執行文件
    spring cloud 服务提供者
    spring cloud: eureka搭建
    通过maven 上传jar 到nexus3,cong nexus3下载jar
    搭建turbine时 hystrix MaxConcurrentConnections reached 异常
    Zuul超时问题,微服务响应超时,zuul进行熔断
    微信公众号开发网址
  • 原文地址:https://www.cnblogs.com/heli/p/1015877.html
Copyright © 2020-2023  润新知