EasyUI Forum
October 17, 2025, 01:12:40 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: Group Rows in DataGrid collapse  (Read 14671 times)
catpaw
Jr. Member
**
Posts: 85


View Profile Email
« on: February 04, 2015, 01:37:25 PM »

hi

in the demo section there are a option Group Rows in DataGrid

How do I can do to make the groups appear collapsed from the beginning ?

                                        view: detailview,
               detailFormatter:function(indext,rowt){
                  return '<div style=\'padding:2px\'><table id=\'ddz-'+indext+'\'></table></div>';
               },
               onExpandRow: function(indext,rowt){               
                  var d = $('#ddz-'+indext);
                  d.datagrid({
                     title:'Accesos: '+rowt.area,
                     url:'source/get.php?area='+rowt.area+'&topic='+rowt.topic,
                     fitColumns:false,
                     singleSelect:true,
                     rownumbers:true,
                     nowrap:false,
                     width:700,
                     height:'auto',
                     collapsible:true,
                     view:groupview,
                     groupField:'topicDesc',
                     groupFormatter:function(value,rows){
                        var rowx = rows[0];
                        return value+' ('+rowx.total+')';
                     },
                     columns:[[
                        {field:'topicDesc',title:'Topic',width:450,sortable:true},
                        //{field:'modulos',title:'Modulos',width:100,sortable:true},
                        {field:'datestr',title:'Date',width:150,sortable:true}
                     ]],
                     onResize:function(){
                        $('#ddv'+indext).datagrid('fixDetailRowHeight',indext);
                     },
                     onLoadSuccess:function(data){
                        setTimeout(function(){
                           $('#ddv'+indext).datagrid('fixDetailRowHeight',indext);
                        },0);
                        $('.totp_po').tooltip({ 
                           position: 'top'
                        });                  
                     }
                  });
                  $('#ddv'+indext).datagrid('fixDetailRowHeight',indext);
               },
               onLoadSuccess:function(data){
                  setTimeout(function(){
                     $('#dg1').datagrid('fixDetailRowHeight',index);
                  },0);
                  $('.totp_po').tooltip({ 
                     position: 'top'
                  });
               }

please help
Logged
jarry
Administrator
Hero Member
*****
Posts: 2300


View Profile Email
« Reply #1 on: February 04, 2015, 04:53:23 PM »

Please refer to this topic http://www.jeasyui.com/forum/index.php?topic=3846.0
Logged
catpaw
Jr. Member
**
Posts: 85


View Profile Email
« Reply #2 on: February 05, 2015, 08:25:19 AM »

works perfect!

thanks
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!