解决方案 »

  1.   

    外层的datagrid调用fixRowHeight,$('#applyList').datagrid('fixDetailRowHeight', index);
    $('#applyList').datagrid('fixRowHeight', index);
      

  2.   

    终于解决了这问题 ,我必须发一下
    因为展开的这个URL是异步的请求,
    $('#dg').datagrid('fixDetailRowHeight',index);
    的执行,其实是在应该在ONLOAD之后才执行就没问题,不然就要看请求的返回情况随机生效了
    解决方法:

                            $('#dg').datagrid('fixDetailRowHeight',index);
                              $('#dg').datagrid('fixRowHeight', index); 
    放到ONLOAD执行就行
    如:                onExpandRow: function(index,row){
                        var ddv = $(this).datagrid('getRowDetail',index).find('div.ddv');
                        ddv.panel({
                            border:false,
                            cache:true,
                            href:'$root/category/showform?index='+index+"&id="+row.id,
                            onLoad:function(){
                                $('#dg').datagrid('fixDetailRowHeight',index);
                                $('#dg').datagrid('selectRow',index);
                                $('#dg').datagrid('getRowDetail',index).find('form').form('load',row);
                                
                            $('#dg').datagrid('fixDetailRowHeight',index);
                              $('#dg').datagrid('fixRowHeight', index);  
                            }
                        });
      

  3.   


    把onLoadSuccess改成下面的就可以了,本人亲测~~(重点是加上了上面那个)
    onLoadSuccess:function(){
                            setTimeout(function(){
                                $('#datagrid').datagrid('fixDetailRowHeight',index);
                                $('#datagrid').datagrid('fixRowHeight', index);
                            },0);
                        }
      

  4.   

    var ddv = $(this).datagrid('getRowDetail',index).find('table.ddv');
                        ddv.datagrid({
                            url:"<%=request.getContextPath()%>/gjlpgl/lpgl_gjlpglAction!selectXlxxByLcno.action?lcno=" + row.lcno,
                            fitColumns:true,
                            singleSelect:true,
                            rownumbers:true,
                            loadMsg:'正在加载数据',
                            height:'auto',
                            columns:[[
                                {field:'xlmc',title:'线路名称',width:100,align:'center'},
                                {field:'lno',title:'线路号',width:50,align:'center'},
                                {field:'lcno',title:'站牌号',width:50,align:'center'},
                                {field:'zhxgsj',title:'时间',width:100,align:'center',
                                 formatter:function(value , record , index){
                                 return value ;
                                 }
                                },
                                {field:'zhxgr',title:'操作者',width:50,align:'center'},
                            ]],
                            onResize:function(){
                                $('#dg').datagrid('fixDetailRowHeight',index);
                            },
                            onLoadSuccess:function(){
                                setTimeout(function(){
                                    $('#dg').datagrid('fixDetailRowHeight',index);
                                    $('#datagrid').datagrid('fixRowHeight', index);
                                },0);
                            }
                        });
                        $('#dg').datagrid('fixDetailRowHeight',index);
    这样设置还是没有效果