【发布时间】:2014-07-01 11:27:29
【问题描述】:
我遇到了在 Dojo 增强网格中显示的数据的问题。网格包含两条记录(行),但显示不正确,并且水平滚动即将到来,可滚动到道场网格的标题之外。
我正在以编程方式创建一个道场增强网格,如下所示:-
网格代码:-
grid= new dojox.grid.EnhancedGrid({
id:"grid",
noDataMessage: noRecMsg,
escapeHTMLInData:false,
plugins: {
filter: {
closeFilterbarButton: false
},indirectSelection: true,
pagination: {
pageSizes: ["25", "50", "100", "All"],
description: true,
sizeSwitch: false,
pageStepper: true,
gotoButton: false,
/*page step to be displayed*/
maxPageStep: 3,
/*position of the pagination bar*/
position: "top"
}},
selectionMode: "single",
autoWidth: true,
rowSelector: '20px'},
document.createElement('div'));
dojo.byId("gridDiv").appendChild(grid.domNode);
grid.startup();
Store and Layout code as:-
gridLayout = [];
gridLayout.push({
'field': gridField,
'name': gridHeader,
'width': '120px'
});
grid.setStore(store);
grid.setStructure(gridLayout);
HTML Code:-
<div id="Det" data-dojo-type="dojox.widget.Portlet" title=" Listing" dragRestriction="true" >
<table width="100%" height="50%" border="0">
<tr><td>
<div id=" gridDiv " ></div>
</td></tr></table>
</div>
我正在尝试删除水平滚动并在不垂直滚动的情况下显示行。 请指导/帮助解决这个问题。尝试了一些选项,例如 (grid.resize()、autoHeight、autoWidth),但都没有奏效。
问候, 萨加尔
【问题讨论】: