Title: Combogrid from markup
Post by: mazvv on January 02, 2014, 11:37:20 AM
Is it possible to make combogrid from markup? For example I have a datagrid: <table class="easyui-datagrid" tal:attributes="url url; id id_datagrid" data-options=" border:false,pagination:true,fit:true,pageSize:50,singleSelect:true, rownumbers:true,sortName:'rid',sortOrder:'desc', pageList:[50,100,500],idField:'_rid',checkOnSelect:false, selectOnCheck:false,toolbar:'#${id_datagrid_toolbar}' " width="100%"> <thead> <tr> <th data-options="field:'_rid',checkbox:true" i18n:translate="">rid</th> <th data-options="field:'rid',sortable:true,width:60" i18n:translate="">rid</th> <metal:block metal:define-slot="fields"> </metal:block> <th data-options="field:'status',width:50,formatter:function(value,row,index){return datagrid_resource_status_format(value);},styler:function(){return datagrid_resource_cell_styler();}"><strong i18n:translate="">status</strong></th> <th data-options="field:'modifydt',sortable:true,width:120,styler:function(){return datagrid_resource_cell_styler();}"><strong i18n:translate="">updated</strong></th> <th data-options="field:'owner',width:100,styler:function(){return datagrid_resource_cell_styler();}"><strong i18n:translate="">owner</strong></th> </tr> </thead> </table>
and I want to make combogrid from it Thanks
Title: Re: Combogrid from markup
Post by: stworthy on January 03, 2014, 12:09:34 AM
Try this. <input id="cg" class="easyui-combogrid" style="width:250px" data-options=" panelWidth: 500, idField: 'itemid', textField: 'productname', data:data, multiple:true, columns: [[ {field:'ck',checkbox:true}, {field:'itemid',title:'Item ID',width:80}, {field:'productname',title:'Product',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:200}, {field:'status',title:'Status',width:60,align:'center'} ]], fitColumns: true ">
|