如何禁用dojox.grid.DataGrid。通过禁用,我的意思是应该禁用整个小部件,而不仅仅是它的某个方面(排序、单元格选择等)。
发布于 2011-09-30 02:52:58
您可以尝试使用此处解释的dojox.widget.Standby:Loading indicator with dojo XHR requests。我从来没有在dojox.grid.DataGrid上使用过它,但它应该可以工作...
发布于 2012-05-17 12:26:40
我想你指的是只读网格;在网格的创建中:
var dataGrid = new dojox.grid.DataGrid({
id: 'xxx',
store: myStore, structure:myLayout,
canSort:false, //disable sorting //Then do the same thing for every attributes options and disable them all
}, dojo.byId("myDivName"));您可能需要覆盖一些默认行为,例如:
onHeaderEvent: function (e) {
//make it do nothing
},并检查来自http://livedocs.dojotoolkit.org/dojox/grid/DataGrid的其他事件,只需清除所有内容。
在你的css中,你可能需要做这样的事情:
.dojoxGridRowSelected
{
background-color:none;
border:none;.....
}
.dojoxGridCellFocus
{
border:none;
}只需从domNodes中查找类名即可
发布于 2016-06-15 21:09:16
使用属性"canSort : false“隐藏或禁用Dojo DataGrid代码中的排序按钮
var newGrid =新的DataGrid({
id : 'newGrid',
canSort:false,
store : this.resultStore,
structure : this.resultGridLayout,
autoHeight:true});
致以敬意,
萨蒂什·M·希雷马特
https://stackoverflow.com/questions/7596093
复制相似问题