handsontable-developer guide-cell type
单元格类型:这里有很多没见过的用法,得好好总结一下
//预定义的类型
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的更多相关文章
- 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 ...
- 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 ...
- 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, Cache Loaders
About Cache Loaders A CacheLoader is an interface that specifies load() and loadAll() methods with a ...
- Ehcache(2.9.x) - API Developer Guide, Cache Exception Handlers
About Exception Handlers By default, most cache operations will propagate a runtime CacheException o ...
- 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 ...
- 移动端目标识别(2)——使用TENSORFLOW LITE将TENSORFLOW模型部署到移动端(SSD)之TF Lite Developer Guide
TF Lite开发人员指南 目录: 1 选择一个模型 使用一个预训练模型 使用自己的数据集重新训练inception-V3,MovileNet 训练自己的模型 2 转换模型格式 转换tf.GraphD ...
- 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 ...
随机推荐
- linux 内核调试之关键函数名记要
gdbserver + gdb 调试内核 记到函数名,其它就能用gdb看了 start_kernel 内核启动 run_init_process init进程启动 主要是根据shell脚本初始化 ...
- C#计数器
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- [转]VS2010 常用插件
本文来自:http://developer.51cto.com/art/201403/432954_all.htm 虽然VS2010IDE功能已经非常强大了,但是在有些地方还是可以优化,或者说有更合适 ...
- ElasticSearch之CURL操作
CURL的操作 curl是利用URL语法在命令行方式下工作的开源文件传输工具,使用curl可以简单实现常见的get/post请求.简单的认为是可以在命令行下面访问url的一个工具.在centos ...
- sort+函数指针、sort+比较器对象、qsort速度比较
一.上代码 #include<bits/stdc++.h> using namespace std; #define MAXN 50000000 struct TS { int a, b, ...
- 软件测试——等价类划分(EditText * 3)
一.程序要求 EditBox 同时允许输入三个1到6个英文字符或数字,点击确定结束. 二.测试分析 编号 第一个输入框 第二个输入框 第三个输入框 输出 1 null null null 三个输入框均 ...
- Spring batch学习 (1)
Spring Batch 批处理框架 埃森哲和Spring Source研发 主要解决批处理数据的问题,包含并行处理,事务处理机制等.具有健壮性 可扩展,和自带的监控功能,并且支持断点和重发.让程序员 ...
- 一些linux知识和http知识
1 yum安装比源码编译安装 有的模块不能自定义安装 只能安装默认的模块进行安装 2 关于php的fastcgi 如果使用fastcgi 那么需要启动服务 如果不使用fastcgi 那么不需要启 ...
- "sc.exe create/delete" - Create or Delete Services
"sc.exe" can also be used to create and delete services. If you want to create a new servi ...
- pthread_create用法(转)
在转载别人文章之前,说一下 pthread_create(); 创建线程返回值. 正常情况下,创建成功则返回 0 : 如果创建失败 通常返回常见的 错误返回代码为: EAGAIN #define ...