EasyUI Forum
September 13, 2025, 02:09:58 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / [datagrid]subgrid in subgrid on: August 01, 2013, 07:55:28 PM
I use subgrid in subgrid ,,, the code is:
$('#dd_list').datagrid({
   fit:true,
    url:http://...,
    iconCls:"icon-save",
    rownumbers:true,
    showFooter:true,
    columns:[[
              ...
              ]],
    pageSize:30,
    pagination:true,
    view: detailview,
    detailFormatter:function(index,row){
         return '<div style="padding:2px"><table id="ddv-' + index + '"></table></div>';
         },
    onExpandRow: function(index,row){
        $('#ddv-'+index).datagrid({
            url:...,
            fitColumns:true,
            autoRowHeight:true,
            rownumbers:true,
            loadMsg:'',
            height:'auto',
            columns:[[...]],
            onResize:function(){
                $('#dd_list').datagrid('fixDetailRowHeight',index);
                },
            onLoadSuccess:function(){
                setTimeout(function(){
                    $('#dd_list').datagrid('fixDetailRowHeight',index);
                    },100);
                },
                view: detailview,
                detailFormatter:function(index1,row1){
                     return '<div style="padding:2px"><table id="ddv1-'+row1.dzddbh.trim()+ index1 + '"></table></div>';
                     },
                onExpandRow: function(index1,row1){
                    $('#ddv1-'+row1.dzddbh.trim()+index1).datagrid({
                        url:...,
                        fitColumns:true,
                        autoRowHeight:true,
                        rownumbers:true,
                        loadMsg:'',
                        height:'auto',
                        columns:[[
                                  ...],[...]
                               ],
                        onResize:function(){
                            $('#ddv-' + index ).datagrid('fixDetailRowHeight',index1);
                            $('#dd_list').datagrid('fixDetailRowHeight',index);
                            },
                        onLoadSuccess:function(){
                            setTimeout(function(){
                                $('#ddv-' + index ).datagrid('fixDetailRowHeight',index1);
                                $('#dd_list').datagrid('fixDetailRowHeight',index);
                                },0);
                            
                            }
                            });
                        $('#ddv-' + index ).datagrid('fixDetailRowHeight',index1);
                        $('#dd_list').datagrid('fixDetailRowHeight',index);
                    }
                });
        $('#dd_list').datagrid('fixDetailRowHeight',index);
        }
    
});

It can work,but there is a problem.
When I show the secord subgrid , the first subgrid is scrolled; and the scroll bar is very short , so that can not see the data directly.
Is there a way that can see the whole data clearly that not scrolled in first subgrid,of course , it can scolled in #dd_list.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!