我想使用backgrid.js在表格单元格中创建一个下拉列表
我正在创建以下专栏:
{ name: "priority",
label: "Priority",
cell: Backgrid.SelectCell.extend({
// It's possible to render an option group or use a
// function to provide option values too.
optionValues: [["one", "a"], ["Two", "b"], ["Three", "c"], ["Four","d"], ["Five", "e"]]
})
}但是这不会呈现Priority列。也不显示下拉列表。
帮帮我,我犯了什么错误?
发布于 2014-04-24 03:16:48
尝尝这个
var PriorityComboCell = Backgrid.Cell.extend({
template: _.template(
'<select name="#" id="priority_select"> ' +
'<option selected="selected"></option>' +
'<option id="a">One</option>' +
'<option id="b">Two</option> ' +
'<option id="c">Three</option>' +
'</select>'
),
events: {
},
render: function () {
this.$el.html(this.template({}));
return this;
}
});https://stackoverflow.com/questions/17336067
复制相似问题