【发布时间】:2016-03-01 10:46:05
【问题描述】:
根据文档here,我正在尝试在我的表格中添加一个下拉列表。
以下代码在没有列属性的情况下可以正常工作..
function getData(obj){
$('body')
.append('<div id="Hot" class="hot handsontable htColumnHeaders"></div>');
var container = document.getElementById('Hot'),hot;
hot2 = new Handsontable(container, {
data:[{
"_____DELETE_____" :"No"
,"CMPCODE" :"H54"
,"CODE" :"666"
,"IFRS_HIERARCHY" :"Goodwill"
}]
,colHeaders: ["_____DELETE_____","CMPCODE","CODE","IFRS_Hierarchy"]
/* the line below prevents data being displayed */
,columns: [{type: 'dropdown',source: ['No','Yes']},{},{},{}]
});
};
它也不是空值 ({}),因为它不能纯粹用于 _____DELETE_____ 列。
我一定遗漏了一些明显的东西,但看不到!我正在使用 .js / .css 文件的 v0.20.1。
EDIT - 创建了一个小提琴:http://jsfiddle.net/rawfocus/22ubvxaa/
【问题讨论】:
标签: handsontable