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的更多相关文章

  1. [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 ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. 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. ...

  8. Ehcache(2.9.x) - API Developer Guide, Cache Manager Event Listeners

    About CacheManager Event Listeners CacheManager event listeners allow implementers to register callb ...

  9. Ehcache(2.9.x) - API Developer Guide, Cache Event Listeners

    About Cache Event Listeners Cache listeners allow implementers to register callback methods that wil ...

随机推荐

  1. [转]命令行在IIS添加虚拟目录

    来自:http://www.jb51.net/softjc/29702.htmlMkwebdir -c LocalHost -w "Default Web Site" –v Com ...

  2. [转][Dapper]SQL 经验集

    condition.Append(" AND ChineseName like @name"); p.Add("@name", "%" + ...

  3. predict.glm -> which class does it predict?

    Jul 10, 2009; 10:46pm predict.glm -> which class does it predict? 2 posts Hi, I have a question a ...

  4. 深入浅出 Java Concurrency (5): 原子操作 part 4 CAS操作

    在JDK 5之前Java语言是靠synchronized关键字保证同步的,这会导致有锁(后面的章节还会谈到锁). 锁机制存在以下问题: (1)在多线程竞争下,加锁.释放锁会导致比较多的上下文切换和调度 ...

  5. apache配置https和http的时候You don't have permission to access / on this server.

    You don't have permission to access / on this server. 是由于没有设置访问目录 今天配置httpd-ssl.conf的时候  发现这个问题 由于默认 ...

  6. OpenCL 第一个计算程序,两向量之和

    ▶ 一个完整的两向量加和的过程,包括查询平台.查询设备.创建山下文.创建命令队列.编译程序.创建内核.设置内核参数.执行内核.数据拷贝等. ● C 代码 #include <stdio.h> ...

  7. JSR 303 - Bean Validation 简介及使用方法

    参考:https://blog.csdn.net/xlgen157387/article/details/46848507 自己写的验证: /** * * @ClassName: BeanValida ...

  8. Discuz 任务、道具、任务和验证类插件制作

    一.广告类脚本位置:source/class/adv/adv_name.php语言包位置:source/language/adv/lang_name.php <?php class adv_na ...

  9. ls 查看时间排序

    1) ls -lt  时间最近的在前面 2) ls -ltr 时间从前到后 3) 利用sort ls -l | sort +7 (日期为第8列)   时间从前到后 ls -l | sort -r +7 ...

  10. js字符转换为数字

    转换函数.强制类型转换.利用js变量弱类型转换. 1. 转换函数: js提供了parseInt()和parseFloat()两个转换函数.前者把值转换成整数,后者把值转换成浮点数.只有对String类 ...