如何解决dojox.grid.DataGrid隐藏/禁用网格的标题
| 我需要一个选项来隐藏来自dojox.grid.DataGrid网格的标题。 没有找到任何东西。 我感谢任何信息!解决方法
我在dojo 1.6中使用(可能从dojo 1.3开始就可以使用)
#myGrid .dojoxGridHeader { display:none; }
, 您可以使用CSS:
.dojoxGrid-header {display:none; }
该解决方案取自:
http://dojotoolkit.org/reference-guide/dojox/grid/DataGrid.html#hiding-the-headers-of-a-grid
, 您可以在数据网格的后端进行连接。然后找到创建的headerGrid元素
然后将样式显示设为无。
//workaround the grid calls postrender after
//the component is at the dom.
//so then i can change the style to reset the header to invisible
dojo.connect(grid,\"postrender\",function(){
var headerGrid =this.domNode.firstElementChild;
headerGrid.style.display=\"none\";
});
, 我建议切换到使用新的和改进的dgrid而不是datagrid,它要好得多!
隐藏标头的设置是属性\'showHeader \',它是一个布尔值。
请查看此dgrid教程,该教程将指导您定义包括\'showHeader \'的网格结构。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。