调了一下午bug。后来解决了datagrid中combobox无论选哪一个选项都显示第一个选项 ,顺带解决了 如何设置默认显示项。
贴上前后的代码。
修改前的: datagrid中的其中一列
<span style="font-size:18px;"> title: '状态',
field: 'status',
width: 50,
align: 'center',
sortable: true,
editor: {
type: 'combobox',
options:{
required: true,
data: [{id:'0',text:'禁用'},{id:'1',text:'启用'}],
panelHeight:50,
editable:false,
}
},
</span>
修改后的:
<span style="font-size:18px;"> title: '状态',
field: 'status',
width: 50,
align: 'center',
sortable: true,