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

//预定义的类型
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. ExtJs 扩展类CheckColumn的使用(事件触发)

    [javascript] view plain copy print? 使用 Extjs 在进行数据库编程经常会遇到 checkbox 的问题(奇怪网上却没有此类文章不知道其他人是怎么解决的,在此贴上 ...

  2. Bootstrap-Plugin:模态框(Modal)插件

    ylbtech-Bootstrap-Plugin:模态框(Modal)插件 1.返回顶部 1. Bootstrap 模态框(Modal)插件 模态框(Modal)是覆盖在父窗体上的子窗体.通常,目的是 ...

  3. Linux 性能分析的前 60 秒

    编译自:http://techblog.netflix.com/2015/11/linux-performance-analysis-in-60s.html作者: Brendan Gregg转载自:h ...

  4. Java遍历一个目录下的所有文件

    Java遍历一个目录下的所有文件   Java工具中为我们提供了一个用于管理文件系统的类,这个类就是File类,File类与其他流类不同的是,流类关心的是文件的内容,而File类关心的是磁盘上文件的存 ...

  5. centos7.3给squid搭建代理服务器添加认证nginx

    1先安装 nginx 这里是教程 点击查看 2 然后 使用命令 创建用户 htpasswd -c /etc/nginx/passwd.db baker 输入密码  提示添加完毕 3 查看加密后的用户和 ...

  6. Pthreads 环境配置,VisualStudio

    ▶ Visual Studio 下配置MPI环境 ● 下载 Pthreads(http://pthreads.org/),解压. ● 针对 x64 程序的配置 ■ 将 Pre-built.2\incl ...

  7. Vim插件之ale,LeaderF,completor.vim(win10)配置

    内容包含 vim-plug,异步插件管理,总之就是下起来快. ale,异步语法检查 LeaderF,快速查找文件 completor.vim vim8的快速补全 markdown预览 common s ...

  8. msxml3.dll 执行页内操作时的错误

    msxml3.dll 执行页内操作时的错误 regsvr32 msxml3.dll报错

  9. 学习Maven之PropertiesMavenPlugin

    1.PRoperties-maven-plugin是个什么鬼? 介绍前我们先看一个问题,比如我们有一个maven项目结构如下:一般我们都把一些配置文件放到像src/main/resources/jdb ...

  10. sqlserver数据库导出成insert语句

    点击数据库名称右键=========>任务========>生成脚本 一.表结构导出成sql语句 二.数据导出成sql语句