单元格类型:这里有很多没见过的用法,得好好总结一下

//预定义的类型
Text
Numeric
Checkbox
Date
Select
Dropdown
Autocomplete
Password
Handsontable in Handsontable
Custom
var data = [
{id: 1, name: 'Ted', isActive: true, color: 'orange', date: '2015-01-01'},
{id: 2, name: 'John', isActive: false, color: 'black', date: null},
{id: 3, name: 'Al', isActive: true, color: 'red', date: null},
{id: 4, name: 'Ben', isActive: false, color: 'blue', date: null}
],
container = document.getElementById('example'),
hot,
yellowRenderer,
greenRenderer; yellowRenderer = function(instance, td, row, col, prop, value, cellProperties){
  //renderer,少加了个s
Handsontable.renderers.TextRenderer.apply(this, arguments);
td.style.backgroundColor = 'yellow';
}; greenRenderer = function(instance, td, row, col, prop, value, cellProperties){
Handsontable.renderers.TextRenderer.apply(this, arguments);
td.style.backgroundColor = 'green';
}; hot = Handsontable(container, {
data:data,
startRows: 5,
colHeader: true,
minSpareRows: 1,
columns: [
{data:'id'},
{data:'name', renderer:yellowRenderer},
{data:'isActive', type:'checkbox'},
  //date写成了data
{data:'date', type:'date', deteFormat:'YYYY-MM-DD'},
{data:'color', type:'autocomplete', source:['yellow', 'red', 'orange', 'blue', 'green']}
],
cell: [
{row:1, col:0, renderer: greenRenderer}
],
cells: function(row, col, prop){
if(row === 0 && col === 0){
this.renderer = greenRenderer;
}
}
});
columns: [{
type: 'text'
}]
等于
columns: [{
renderer: Handsontable.renderers.TextRenderer,
editor: Handsontable.editors.TextEditor
}]

handsontable-developer guide-cell type的更多相关文章

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

  2. Intel® Threading Building Blocks (Intel® TBB) Developer Guide 中文 Parallelizing Data Flow and Dependence Graphs并行化data flow和依赖图

    https://www.threadingbuildingblocks.org/docs/help/index.htm Parallelizing Data Flow and Dependency G ...

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

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

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

  6. Ehcache(2.9.x) - API Developer Guide, Cache Loaders

    About Cache Loaders A CacheLoader is an interface that specifies load() and loadAll() methods with a ...

  7. Ehcache(2.9.x) - API Developer Guide, Cache Exception Handlers

    About Exception Handlers By default, most cache operations will propagate a runtime CacheException o ...

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

  9. 移动端目标识别(2)——使用TENSORFLOW LITE将TENSORFLOW模型部署到移动端(SSD)之TF Lite Developer Guide

    TF Lite开发人员指南 目录: 1 选择一个模型 使用一个预训练模型 使用自己的数据集重新训练inception-V3,MovileNet 训练自己的模型 2 转换模型格式 转换tf.GraphD ...

  10. Ehcache(2.9.x) - API Developer Guide, Basic Caching

    Creating a CacheManager All usages of the Ehcache API start with the creation of a CacheManager. The ...

随机推荐

  1. SQL Developer更改日期显示格式

    工具->首选项->数据库->NLS->日期格式: DD-MON-RR 修改为: YYYY-MM-DD HH24:MI:SS

  2. 黄聪:C#多线程教程(1):BeginInvoke和EndInvoke方法,解决主线程延时Thread.sleep柱塞问题(转)

    开发语言:C#3.0 IDE:Visual Studio 2008 本系列教程主要包括如下内容: 1.  BeginInvoke和EndInvoke方法 2.  Thread类 3. 线程池 4. 线 ...

  3. ACM-Teleportation

    我的代码: #include <bits/stdc++.h> using namespace std; int main() { int a,b,x,y; cin>>a> ...

  4. Rancher的安装配置

    1.基于Docker镜像安装Rancher Rancher 服务器是一个 Docker image,所以其软件本身不需要安装,只需要执行 Docker 命令下载并且成功运行 Docker 服务器镜像即 ...

  5. Rhythmk 一步一步学 JAVA (19): 注解 annotation

    在编写注解的时候需要了解的四种注解: @Target 表示该注解可以用于什么地方,可能的ElementType参数有: CONSTRUCTOR:构造器的声明 FIELD:域声明(包括enum实例) L ...

  6. 「小程序JAVA实战」小程序的springboot后台拦截器(61)

    转自:https://idig8.com/2018/09/24/xiaochengxujavashizhanxiaochengxudespringboothoutailanjieqi60/ 之前咱们把 ...

  7. 两种定时器 setInterval(一直执行) setTimeout(只执行一次)

    //第一种 var obj = setInterval(function () { console.log(123); clearInterval(obj) }, 1000); //第二种 var t ...

  8. HTTP --meta详解

    meta是html语言head区的一个辅助性标签.也许你认为这些代码可有可无.其实如果你能够用好meta标签,会给你带来意想不到的效果,meta标签的作用有:搜索引擎优化(SEO),定义页面使用语言, ...

  9. LUA表与函数的深入理解

    local heroInfo = {} --直接打印 table的名字,就会输出该table的内存地址 print("表地址---------------",heroInfo) - ...

  10. k8s实战

    wget https://github.com/coreos/etcd/releases/download/v2.2.0/etcd-v2.2.0-linux-amd64.tar.gz etcd -na ...