var combobox_json = [{
"combobox_value" : "GDLB01",
"combobox_name" : "选项1"
}, {
"combobox_value" : "GDLB02",
"combobox_name" : "选项1"
}, {
"combobox_value" : "GDLB03",
"combobox_name" : "选项3"
}, {
"combobox_value" : "GDLB04",
"combobox_name" : "选项4"
}, {
"combobox_value" : "GDLB05",
"combobox_name" : "选项5"
}
]; $("#dg1").datagrid({
idField : "id",
//fitColumns: true,
data : [{
"id" : "id1",
"combobox_value" : "GDLB011",
"combobox_name" : "选项1"
}, {
"id" : "id2",
"combobox_value" : "GDLB012",
"combobox_name" : "选项2"
}, {
"id" : "id3",
"combobox_value" : "GDLB013",
"combobox_name" : "选项3"
}, {
"id" : "id4",
"combobox_value" : "GDLB014",
"combobox_name" : "选项4"
}, {
"id" : "id5",
"combobox_value" : "GDLB015",
"combobox_name" : "选项5"
}
],
queryParams : {},
columns : [[{
field : 'combobox_value',
title : '工段',
width : 150,
editor : {
type : 'combobox',
options : {
valueField : "combobox_value",
textField : "combobox_name",
data : combobox_json }
},
formatter : function (value, row, index) {
for (var i = 0; i < combobox_json.length; i++) {
if (combobox_json[i].combobox_value == value) {
return combobox_json[i].combobox_name;
}
}
return row["combobox_name"];
}
}
]]
});

技术交流QQ群:15129679

最新文章

  1. freeswitch对接其它SIP设备
  2. Sharepoint学习笔记—习题系列--70-576习题解析 -(Q102-Q104)
  3. Webpack使用教程一
  4. Scala 深入浅出实战经典 第55讲:Scala中Infix Type实战详解
  5. ionic ngcordova map 地圖
  6. 前端H5开发工具 Adobe Edge
  7. PC软件-实用工具 True Launch Bar
  8. [HDU 5029] Relief grain
  9. shell入门之expr的使用 分类: 学习笔记 linux ubuntu 2015-07-10 14:59 76人阅读 评论(1) 收藏
  10. PHP Curl CURLOPT_POSTFIELDS 1024
  11. perl 爬虫两个技巧
  12. UVa 10427 - Naughty Sleepy Boys
  13. SQL菜鸟学习札记(一)
  14. linux segmentation fault记录
  15. cordova文件系统插件的使用方法:cordova-plugin-file
  16. Java 简单的登录验证码
  17. vuex实现原理
  18. DMA与cache一致性的问题
  19. 变量 var &amp;函数new
  20. 使用LTP套件对Linux系统进行压力测试

热门文章

  1. [Luogu5106]dkw的lcm
  2. [Agc001E] BBQ Hard
  3. 轻巧的编辑器:Sublime Text3 user设置
  4. Java集合的ConcurrentModificationException
  5. Python168的学习笔记3
  6. django: ListView解读
  7. 你了解for循环吗
  8. unity热更新
  9. 淘宝API得到单个商品的信息,用了淘宝的SDK...
  10. [Asp.Net web api]基于自定义Filter的安全认证