easyui datagrid某列绑定下拉列表,该怎么解决
easyui datagrid某列绑定下拉列表
{ field: 'Ptype', title: '类别', width: 200, editor: 'text' },
数据获取后,如何在field当中绑定combox下拉列表
------解决思路----------------------
你是要绑定下拉列表中固定下标的值吗?
------解决思路----------------------
selectedIndex
这个词你考虑过吗?
------解决思路----------------------
配置editor为'combobox'就行了,easyui的demo有这种示例
{ field: 'Ptype', title: '类别', width: 200, editor: 'text' },
数据获取后,如何在field当中绑定combox下拉列表
------解决思路----------------------
你是要绑定下拉列表中固定下标的值吗?
------解决思路----------------------
selectedIndex
这个词你考虑过吗?
------解决思路----------------------
配置editor为'combobox'就行了,easyui的demo有这种示例
var products = [
{productid:'FI-SW-01',name:'Koi'},
{productid:'K9-DL-01',name:'Dalmation'},
{productid:'RP-SN-01',name:'Rattlesnake'},
{productid:'RP-LI-02',name:'Iguana'},
{productid:'FL-DSH-01',name:'Manx'},
{productid:'FL-DLH-02',name:'Persian'},
{productid:'AV-CB-01',name:'Amazon Parrot'}
];
//....
{ field: 'Ptype', title: '类别', width: 200, editor:{type:'combobox',options:{valueField:'productid',textField:'name',data:products,required:true}}}