easy datagrid 下拉框 显示不出来

mi七月 2017-07-05 03:00:03
datagrid 里面放下拉框,怎么放都不出现



$(function() {

var products = [
{ id: '1', name: 'Koi' },
{ id: '2', name: 'Dalmation' },
{ id: '3', name: 'Rattlesnake' },
{ id: '4', name: 'Iguana' },
{ id: '5', name: 'Manx' },
{ id: '6', name: 'Persian' },
{ id: '7', name: 'Amazon Parrot' }
];

$('#dg').datagrid({
url: 'datagrid_data1.json',
method: 'get',
title: 'Context Menu on DataGrid',
iconCls: 'icon-save',
width: 700,
height: 250,
fitColumns: true,
singleSelect: true,
columns: [
[
{ field: 'itemid', title: 'Item ID', width: 80 },
{ field: 'productid', title: 'Product ID', width: 120 },
{ field: 'listprice', title: 'List Price', width: 80, align: 'right' },
{ field: 'unitcost', title: 'Unit Cost', width: 80, align: 'right' },
{ field: 'attr1', title: 'Attribute', width: 250 },
{ field: 'status', title: 'Status', width: 60, align: 'center' },
{ field: 'per', title: '类别', width: 200, editor: { type: 'combobox', options: { valueField: 'id', textField: 'name', data: products } } }
]
]
});
});
...全文
374 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
chunxiaoaini 2021-05-17
  • 打赏
  • 举报
回复
这。。。。解决了吗
hb_dmgy 2017-07-18
  • 打赏
  • 举报
回复
var products = [ { ”id“: ”1“, ”name“: “Koi”}, ...... ]; 明白?
baidu_20374063 2017-07-11
  • 打赏
  • 举报
回复
给你参考一下 {field : 'TYSID',title : '颜色名称',width:100, formatter:function(value,row){ return row.TYSMC; }, editor:{ type:'combobox', options:{ valueField:'TID', textField:'TMC', method:'get', url:_pub.DBurl('TDB2'), } } },
mi七月 2017-07-05
  • 打赏
  • 举报
回复
好气哦,为什么别人的都出来,就我出不来~~
mi七月 2017-07-05
  • 打赏
  • 举报
回复

87,994

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧