2014-07-01 50 views
0

我面临着Dojo增强型网格中显示的数据问题。网格包含两条记录(行),但它不能正确显示,并且水平滚动即将到来,可以滚动到dojo网格的标题之外。Dojo增强型网格中的SCROLL问题 - 以编程方式

我编程方式创建道场增强电网如下: -

GRID代码: -

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),但没有工作。

问候, 萨加尔

回答

0

增强电网有两个主要的div(“dojoxGridContent”,“dojoxGridScrollbox”)ü可以使用他们一次萤火虫渲染页面罚款。下面是它是如何转换为HTML标签部分

<div role="presentation" dojoattachpoint="scrollboxNode" class="**dojoxGridScrollbox**" style="height: 461px; overflow: hidden;"> 
    <div role="presentation" hidefocus="hidefocus" dojoattachpoint="contentNode" class="**dojoxGridContent**" style="height:100%; overflow-y:auto;"> 

你需要重写溢出属性为“dojoxGridContent” deiv前溢出-Y:自动(将垂直滚动设置为true和水平,以假)

dojo.query('.dojoxGridContent').attr('style','overflow-y:auto;'); 

另一种方法是增加“dojoxGridContent”div的高度使用相同的语法aboec。

相关问题