Title: Error using rows grouping [RESOLVED] Post by: evaro on January 08, 2015, 08:53:32 AM I'm trying to group rows in a datagrid, there is a demo at:
http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem= But I indicates a failure, with "view: 'groupview'" => opts.view.render is undefined, With "view: groupview" error is that the GroupView object is not defined. My code is as follows: HTML: <div id="winTblBultos"> <div id="detTblBultos"></div> </div> JS: $("#detTblBultos").datagrid({ // title: 'Detalles de Bulto', width: 800, height: 'auto', rownumbers: true, showHeader: true, singleSelect: true, // iconCls: 'icon-edit', fitColumns: true, collapsible:true, view:'groupview', // groupField:'btoInic', groupFormatter: function(value,rows) { // return 'Bulto ' + value + '( ' + rows.length + ' ) SKUs'; return value; }, url: "php/etiquetas.php", type: "POST", // toolbar: "#toolBultos", queryParams: { accion: 'cargaGridDetalleBultos', nroOC: nroOCBuscar,data: filaSelec}, columns: [[ {field: 'nroFactura', width:100, title: 'Factura', halign:'center'}, {field: 'btoInic', width:70, title: 'Bulto', required: true, align:'right', halign:'center',editor:'numberbox'}, {field:'ccctCliente', width:150,title:'CCCT',required:true,halign:'center',editor:'text'}, {field:'codProv',width:150,title:'Cod.Ripley',required:true,halign:'center',editor:'text'}, {field: 'cantidad', width:100, title: 'Cantidad ', required:true,halign:'center' }, {field: 'btoFec', width:150, title: 'Fecha ', required:true,halign:'center', editor:'datebox' }, {field: 'nroPedido', width:100, title: 'Pedido', halign:'center',hidden:true}, {field: 'nroOC', width:100, title: 'O.C.', halign:'center',hidden:true}, {field: 'nroReserva', width:100, title: 'Reserva', align:'right', halign:'center',hidden:true}, {field: 'sucCliente', width:100, title: 'Sucursal', align:'left', halign:'center',hidden:true}, {field: 'prodxBulto', width:100, title: 'ProdxBulto ', required:true,halign:'center',hidden:true }, ]], }); No GroupView, php returns the rows correctly I'm using version 1.3.6 and also probe to last, but I get the same error Title: Re: Error using rows grouping Post by: stworthy on January 08, 2015, 09:17:07 AM You set a wrong 'view' property value, please try the code below instead.
Code: $("#detTblBultos").datagrid({ This example http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem=Group%20Rows%20in%20DataGrid works fine. Title: Re: [RESOLVED] Error using rows grouping Post by: evaro on January 09, 2015, 01:38:36 PM Exactly! ... I did not put the link to datagrid-groupview.js; I thought it was included in easyui. Now everything is running perfect.
Again thank you very much! |