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 ...
随机推荐
- ASP.NET 执行bat文件。
参考代码: http://blog.csdn.net/youngivan/article/details/7722384 在VS开发环境上是 网站应用程序能够正常执行bat,在winServer服务器 ...
- 0001_mysql 5.7.25安装初始化
一. 下载mysql https://dev.mysql.com/downloads/mysql/ 二. 选择社区版本 三. 选择版本下载: 四. 跳过注册直接下载: 五. 解压后 ...
- javascript的propertyIsEnumerable()方法
/* propertyIsEnumerable()是用来检测属性是否属于某个对象的,如果检测到了,返回true,否则返回false. 1.这个属性必须属于实例的,并且不属于原型. 2.这个属性必须是可 ...
- 线程等待 Join()方法
Join()方法是让一个线程等待另一个线程的完成 下面看个例子: package project11; public class TestJoin extends Thread { public vo ...
- ubuntu sudo apt-get update与sudo apt-get upgrade的作用及区别,以及python pip的安装
在UBUNTU下,我们维护一个源列表,源列表里面都是一些网址信息,这每一条网址就是一个源,这个地址指向的数据标识着这台源服务器上有哪些软件可以安装使用.编辑源命令: sudo gedit /etc/a ...
- mysql java.sql.SQLException: Can't call commit when autocommit=true
java.sql.SQLException: Can't call commit when autocommit=true at com.mysql.jdbc.SQLError.createSQLEx ...
- VS2013默认打开HTML文件没有设计视图
打开VS菜单->工具->选项->文本编辑器->文件扩展名,右侧输入html,再下拉列表选HTML(Web窗体)编辑器,点添加,确定. 第二条是彻底解决VS2013不能编辑HTM ...
- SpringMVC 学习笔记(处理器映射器的配置)
前端控制器(dispatchServlet) 在web.xml中配置前端控制器,在服务器启动时就被创建,用来对请求和响应进行接收 和 分发处理,其在配置时可以设置一个初始化参数,用来定位SpringM ...
- Vue SPA应用中使用Layer的iframe 弹出层,并且传值
问题来源: BOOS 竟然说喜欢有可移动可最大化的弹出层,这!!! SPA 模式下就是这种引入Vue.js的写法 layer.open({ type: , area: ['840px', '550px ...
- mybatis与hibernate不同(重要)
Mybatis和hibernate不同,它不完全是一个ORM框架,因为MyBatis需要程序员自己编写Sql语句,不过mybatis可以通过XML或注解方式灵活配置要运行的sql语句,并将java对象 ...