var D = new TDataIO();
D.Layout.Url = "scripts/treegrid_9_3_11/batch_treegrid_def.xml";
if (layoutBonus)
{
D.Layout.Bonus = layoutBonus;
}
D.Data.Url = url;
D.Debug = 0;
D.Data.Timeout = 210;
D.Page.Url = URL_CONTEXT + "LoadPage.action";
D.Page.Format = "Internal";
D.Page.Data = "TGData";
D.Page.Timeout = 120;
G = TreeGrid(D, "batchGrid");
在 JSP 中,我们创建一个这样的 div:
<s:div id="batchGrid" cssStyle="height:100% width:100%"/>
错误: 网格太小
不确定这个 div 高度是如何设置为 0px 的?
<div id='batchGrid' style='height: 0px; overflow: hidden;'/>
batch_treegrid_def.xml 配置文件
<Cfg id='batchTable' MainCol='Details'
Sorting='0' Deleting='0'
Scrolling='1' ConstHeight='0' ConstWidth='1' MaxHeight='20'
Paging='3' ChildPaging='3' PageLength='25' Copying='1'
RemoveCollapsed='2'
CopyFocused='0'
NoHScroll='0' Style='Modern' SuppressCfg='1' StandardTip='1'/>
最佳答案
根据文档:
To let grid maximize its main tag to window height, on your page there must not be:
a) any parent tag (in hierarchy from grid to ) with overflow set to hidden, auto or scroll.
b) any parent tag (in hierarchy from grid to ) with position:absolute.
c) any tag (except tags included in tag with not visible overflow or absolute position) with height set to percentage (like height:100%).
所以基本上,您必须为您的 div 定义一个静态高度。
关于javascript - Treegrid 9.3.11 未在 chrome 61 中加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46305875/