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

//预定义的类型
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. PHP代码实现 1

    $PHP-SRC/run-test.php 因为如果在同一个进程中执行, 测试就会停止,后面的测试也将无法执行,php中有很多将脚本隔离的方法比如: system(),exec()等函数,这样可以使用 ...

  2. 【翻译】HTML5开发——轻量级Web Database存储库html5sql.js

    方式1: html5sql官方网址:http://html5sql.com/ 阅读之前,先看W3C关于WEB Database的一段话: Beware. This specification is n ...

  3. hBuilder培训资源视频教程汇总

    DCloud对开发者的学习支持分3个层面:官方文档.三方专业培训.网友经验分享 DCloud的精力主要在做产品,配套的文档也会一直完善好.但专业的培训还不是DCloud能做好的,在HTML5中国产业联 ...

  4. MariaDB Galera Cluster的配置测试

    参考的https://fykuan.hsnuer.net/blog/2015/01/23/debian-%E4%B8%8A%E5%AE%89%E8%A3%9D-mariadb-galera-clust ...

  5. 峰Spring4学习(7)spring对JDBC的支持

    第一节: 工程结构: 1)student.java: package com.cy.model; public class Student { private int id; private Stri ...

  6. E: Invalid operation build-depgcc(给字符界面的ubuntu安装gcc 报错

    sudo apt-get  build-depgccE: Invalid operation build-depgcc 原因是中间少了个空格, 使用如下命令即可. sudo apt-get  buil ...

  7. javascript 判断空数组

    javascript里判断空数组不能用 []==[] 这样来判断,因为数组也是个对象,普通对象通过指针指向的内存中的地址来做比较 所以 []==[]结果为false,因此判断数组是否为空 用 [].l ...

  8. [置顶] caffe+CPU︱虚拟机+Ubuntu16.04+CPU+caffe安装笔记

    由于虚拟机下的Ubuntu系统一般不包含GPU,故这次安装时为了在无GUP环境下运行caffe.所以只需安装CPU版本的caffe 由于本机是window10系统,所以想尝试caffe就在自己电脑上整 ...

  9. Solr分组聚合查询之Facet

    摘要: Solr的分组聚合是一个笼统的概念,目的就是把查询结果做分类,有多种方式可以做到很类似的结果.也正是由于它们的不同表现,可以适合于多种场景. 何为Facet Facet是一种手段,用来将搜索结 ...

  10. 最简单的WebService

    写在前面的话: 当两个人碰面后,产生了好感,如果需要得到双方的信息,那么双方的交流是必不可少的!应用程序也如此, 各个应用程序之间的交流就需要WebService来作为相互交流的桥梁! 项目目的: 程 ...