zoukankan      html  css  js  c++  java
  • Dynamics CRM JS 隐藏子网格“+”号(不推荐,随笔记录)

    调用示例代码:

     hideAddButton(window, "tab_approval_process,nextcustomer,billTo,account_attachment");
    function hideAddButton(w, subgrids) {
        ///<summary>隐藏子网格加号按钮</summary>
        /// <param name="w">window对象</param>
        /// <param name="subgrids">子网格名称,多个英文逗号隔开</param>
      var subgrid = subgrids.split(',');
        for (var i = 0; i < subgrid.length; i++) {
            var _id = subgrid[i] + "_contextualButtonsContainer";      var _button = w.document.getElementById(_id);
            if ((_button == null || _button == undefined) && window.parent != null && window.parent != undefined) {
                _button = w.parent.window.document.getElementById(_id);
            }
            if (_button != undefined && _button != null) {
                _button.style.display = "none";
            }
        }
    }

    function hideAddButton(w, subgrids) {    ///<summary>隐藏子网格加号按钮</summary>    /// <param name="w">window对象</param>    /// <param name="subgrids">子网格名称,多个英文逗号隔开</param>    console.log("w=" + w);    console.log("subgrids=" + subgrids);
        var subgrid = subgrids.split(',');    for (var i = 0; i < subgrid.length; i++) {        var _id = subgrid[i] + "_contextualButtonsContainer";        console.log("ID=" + subgrid[i] + ",i=" + i);        var _button = w.document.getElementById(_id);
            if ((_button == null || _button == undefined) && window.parent != null && window.parent != undefined) {            _button = w.parent.window.document.getElementById(_id);        }        if (_button != undefined && _button != null) {            _button.style.display = "none";            console.log("ID=" + _id + ",Display=" + _button.style.display);        }    }
    }

  • 相关阅读:
    48、Windows驱动程序模型笔记(六),同步
    44、Windows驱动程序模型笔记(二)
    JavaP:对象创建
    JavaP:继承和多态【只有提纲】
    ASP.NET MVC:一个简单MVC示例
    JavaP: 2、类和对象
    ASP.NET MVC:解析 MVC+ADO.NET Entity(实体类)
    Oracle: 一、Oracle简介,安装,基本使用,建表增删改查,数据类型及常用命令
    JavaP:面向对象编程
    ASP.NET: PagedDataSource
  • 原文地址:https://www.cnblogs.com/dmei/p/15601493.html
Copyright © 2011-2022 走看看