EasyUI Forum
September 14, 2025, 07:21:33 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Error using rows grouping [RESOLVED]  (Read 8416 times)
evaro
Newbie
*
Posts: 7


View Profile Email
« 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

« Last Edit: January 09, 2015, 01:39:42 PM by evaro » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: January 08, 2015, 09:17:07 AM »

You set a wrong 'view' property value, please try the code below instead.
Code:
$("#detTblBultos").datagrid({
  view: groupview
});

This example http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem=Group%20Rows%20in%20DataGrid works fine.
Logged
evaro
Newbie
*
Posts: 7


View Profile Email
« Reply #2 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!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!