Handsontable

Handsontable使用

1.自动填充

fillHandle:true/false

2.合并单元格

mergeCells:[{row,cols,rowspan,colspan}]

3.单元格对齐方式

水平

    hLeft,htCenter,hRight,htJustify

垂直

    htTop,hdMiddle,hBotton

4.只读

列

    readonly:true

单元格

    cellProperties,readOnly:true

5.类型单元格

text,numberic,date,checkbox,password

select:下拉

columns:[

    {editor:'select',

    selectOption:[A,B,C...]},

]

6.选中触发事件

afterChange:function(){

    var tmpData=JSON.parse(JSON.stringify(data));

}

7.其他设置

标题

    rowHeaders:true

    colHeaders:true

重新加载数据

    data[0][1]='Ford'

    hot.render();

数据不变

    data:JSON.parse(JSON.stringify(data))

来源张永光的博客

你可能感兴趣的:(js,js)