zoukankan      html  css  js  c++  java
  • 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是多选框对应的文字

  • 相关阅读:
    Vue菜单栏权限
    elementUI上传图片回显在编辑
    js数据处理
    js数组去重
    elemetUI中el-checkbox-group经过条件判断选中与不选中的问题
    vue强制更新$forceUpdate()
    SASS @mixin 遇到的坑
    点击锚点浏览器锚点前出现/ 斜杠
    POST 传参
    page.php 引入js文件
  • 原文地址:https://www.cnblogs.com/heli/p/1015877.html
Copyright © 2011-2022 走看看