zoukankan      html  css  js  c++  java
  • spreadJs文档(简要记录)

    表结构数据属性:

    columns = [
    	//name:表头数据的枚举属性 displayName:表头的名称 size:列宽 editor:是否可以编辑 headerBgColor:表头颜色  visible:是否隐藏当前栏位
    	{ name: '', displayName: '', size: 100, editor: true, headerBgColor: "", visible: false }
    ];
    

    列表操作事件:

    $("#").SpeadJS({
          "bAutoBind": false,
            "bPaginate": false, //是否分页
            "sType": "POST",
            "jColumnCustom": { visible: true, name: "", toBtn: "", sort: true },
            "fnCustomStyle": function(spread, sheet, spreadNS, jColInfos) { //自定义样式
                spread.options.showVerticalScrollbar = true;//是否启用纵向滚动条
                sheet.frozenColumnCount(5); //设置冻结列,冻结列不参与滚动
                sheet.bind(spreadNS.Events.CellClick, function(e, args) {
                sheet.bind(spreadNS.Events.ValidationError, function(e, args) {//单元格校验
                });
                //单元格添加勾选框  -1表示整个列添加
                var checkBox1 = new GC.Spread.Sheets.CellTypes.CheckBox();
                sheet.setCellType(-1, _columnIndex.URGENT_ORDER_EX, checkBox1, GC.Spread.Sheets.SheetArea.viewport);
                sheet.setCellType(-1, _columnIndex.IMPORTANT_ORD_EX, checkBox1, GC.Spread.Sheets.SheetArea.viewport);
        
          // 设置下拉列表
                    let aaa= [{ text: "翻新, value: "" }, { text: "", value: "" }, { text: "", value: "" }];
                    let bbb = new spreadNS.CellTypes.ComboBox(); 
                    bbb.items(aaa).editorValueType(spreadNS.CellTypes.EditorValueType.text); 
                    //第一个数据代表处于第几行 ,-1代表全部
                    sheet.getRange(-1, index01, -1, 1).cellType(bbb);
     
                //列的编辑开始事件
                sheet.bind(spreadNS.Events.EditStarting, function(e, args) {
                });
                //粘贴事件
                sheet.bind(GC.Spread.Sheets.Events.ClipboardPasting, function(s, args) {
                });
                //列的值改变的事件
                sheet.bind(spreadNS.Events.ValueChanged, function(e, args) {
                });

                //Delete键盘删除事件
                sheet.bind(spreadNS.Events.RangeChanged, function(e, args) {
                });
            },
         //数据绑定之前的操作,类似vuedom节点加载前
            "fnBindDataSourceBefore": function (data) {
            },      //单元格点击事件
            "fnButtonClickedCallback": function(row, col, bChecked) {
            }
        });

      

      

  • 相关阅读:
    Makefile中的ifeq 多条件使用
    Android引入动态库so的方法
    在Win10上使用Visual Studio2015的Android模拟器
    linux下insmod模块出现“Invalid parameters"
    在干净的ubuntu 14.10上编译Qemu2.2.0的过程
    Windows下struct和union字节对齐设置以及大小的确定(一 简介和结构体大小的确定)
    C++类中一个构造函数调用另一个构造函数
    用汇编语言角度来理解C语言的一些问题
    TCP协议的安全性分析
    MySQL入门,第四部分,学会创建、删除表
  • 原文地址:https://www.cnblogs.com/sixrookie/p/13091690.html
Copyright © 2011-2022 走看看