columns: [
{
text: 'Ship City', datafield: 'ShipCity', width: 150, columntype: 'combobox',
createeditor: function (row, column, editor) {
// assign a new data source to the combobox.
var list = ['Stuttgart', 'Rio de Janeiro', 'Strasbourg'];
editor.jqxComboBox({ source: list, promptText: "Please Choose:" });
},
// update the editor's value before saving it.
cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
// return the old value, if the new value is empty.
if (newvalue == "") return oldvalue;
}
},
{
text: 'Ship Country', datafield: 'ShipCountry', width: 150, columntype: 'dropdownlist',
createeditor: function (row, column, editor) {
// assign a new data source to the dropdownlist.
var list = ['Germany', 'Brazil', 'France'];
editor.jqxDropDownList({ source: list });
},
// update the editor's value before saving it.
cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
// return the old value, if the new value is empty.
if (newvalue == "") return oldvalue;
}
},
{ text: 'Ship Name', datafield: 'ShipName', columntype: 'combobox' }
]
JQXGrid以自定义数据为表格下拉框的值
原创pyzheng 博主文章分类:Javascript ©著作权
文章标签 hh 文章分类 JavaScript 前端开发
©著作权归作者所有:来自51CTO博客作者pyzheng的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
EOS自定义下拉框的值
EOS自定义数据字典
自定义 json数组 加载 -
【EasyUI篇】Combo自定义下拉框组件
微
EasyUI Combo css ide javascript -
Android自定义spinner下拉框实现的实现
说道android下拉框spineer,框架中虽有现成的控件,但实际效果可能并不是我们所需要
Spiner ide java List -
jQuery自定义美化下拉框
在线演示 本地下载
自定义美化下拉框 jQuery