handsontable-developer guide-setting options,callback
1、cell数组
cell: [
{row: 0, col: 0, readOnly: true}
]
2、cells函数
cells: function(row, col, prop){
var cellProperties = {};
if(row === 0 && col === 0){
cellProperties.readOnly = true;
}
return cellProperties;
}
3、串联设置:第一列可以编辑;第一列的第一行 和 其他 都是只读的。
readOnly: true,
columns: [
{readOnly: false},
{},
{}
],
cells: function (row, col, prop) {
var cellProperties = {} if (row === 0 && col === 0) {
cellProperties.readOnly = true;
} return cellProperties;
}
4、串联配置模型
//constructor
new Handsontable(document.getElementById('example'), {
option: 'value'
});
//columns
new Handsontable(document.getElementById('example'), {
columns: {
option: 'value'
}
});
//cells
new Handsontable(document.getElementById('example'), {
cells: function(row, col, prop) { }
});
回调函数好复杂:
Handsontable.hooks.getRegistered(): 返回所有注册的函数
给config加个变量就好,如果不知道callback的参数,console.log(arguments)就可以
handsontable-developer guide-setting options,callback的更多相关文章
- [Forward]Visual Guide: Setting up My Sites in SharePoint 2013
from http://blog.sharedove.com/adisjugo/index.php/2012/07/25/visual-guide-setting-up-my-sites-in-sh ...
- Ehcache(2.9.x) - API Developer Guide, Write-Through and Write-Behind Caches
About Write-Through and Write-Behind Caches Write-through caching is a caching pattern where writes ...
- Ehcache(2.9.x) - API Developer Guide, Cache Eviction Algorithms
About Cache Eviction Algorithms A cache eviction algorithm is a way of deciding which element to evi ...
- Ehcache(2.9.x) - API Developer Guide, Key Classes and Methods
About the Key Classes Ehcache consists of a CacheManager, which manages logical data sets represente ...
- Ehcache(2.9.x) - API Developer Guide, Cache Usage Patterns
There are several common access patterns when using a cache. Ehcache supports the following patterns ...
- Ehcache(2.9.x) - API Developer Guide, Searching a Cache
About Searching The Search API allows you to execute arbitrarily complex queries against caches. The ...
- Ehcache(2.9.x) - API Developer Guide, Transaction Support
About Transaction Support Transactions are supported in versions of Ehcache 2.0 and higher. The 2.3. ...
- Ehcache(2.9.x) - API Developer Guide, Cache Manager Event Listeners
About CacheManager Event Listeners CacheManager event listeners allow implementers to register callb ...
- Ehcache(2.9.x) - API Developer Guide, Cache Event Listeners
About Cache Event Listeners Cache listeners allow implementers to register callback methods that wil ...
随机推荐
- C# 转义字符 '\'反斜杠
在代码中经常用到表示路径的字符串,如何正确转换反斜杠? 如要将"C:\123"转换成"C:\\123" 如何转换? 方法: string str="C ...
- Erlang process structure -- refc binary
Erlang 的process 是虚拟机层面的进程,每个Erlang process 都包括一个 pcb(process control block), 一个stack 以及私有heap . 这部分的 ...
- java中的变量和常量
也可以先声明后赋值 自动类型转换 1. 目标类型能与源类型兼容,如 double 型兼容 int 型,但是 char 型不能兼容 int 型 2. 目标类型大于源类型,如 double 类型长度 ...
- HDU 4586 Play the Dice(数学期望)
Play the Dice Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Tot ...
- 1027代码审计平台 3 Java maven
使用成熟的构建工具对maven工程进行分析 官网:SCAN/Analyzing+with+SonarQube+Scanner+for+Maven 1.如下图修改settings.xml文件 1.1查看 ...
- Web API 源码剖析之默认消息处理程序链--》路由分发器(HttpRoutingDispatcher)
我们在上一节讲述了默认的DefaultServer(是一个类型为HttpServer的只读属性,详情请参考 Web API 源码剖析之全局配置).本节将讲述DefaultHandler(是一个Http ...
- JS表单常见表达式(正则)
整数或者小数:^[0-9]+\.{0,1}[0-9]{0,2}$ 只能输入数字:"^[0-9]*$". 只能输入n位的数字:"^\d{n}$". 只能输入至少n ...
- 迷你MVVM框架 avalonjs 1.2.5发布
avalon1.2.5发布,升级ms-widget,整合avalon.require.text到核心,并且修复了avalon.mobile的avalon.innerHTML方法的BUG,让它能执行脚本 ...
- 在MetaFile里放图片
procedure TForm1.Button1Click(Sender: TObject); var m : TmetaFile; mc : TmetaFileCanvas; b : tbitmap ...
- _MainTex_TexelSize what's the meaning?
uniform float4 _MainTex_TexelSize where is the value of the float4 _MainTexelSize from? It's set by ...