首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何禁用dojox.grid.DataGrid

如何禁用dojox.grid.DataGrid
EN

Stack Overflow用户
提问于 2011-09-29 18:40:21
回答 3查看 2.4K关注 0票数 2

如何禁用dojox.grid.DataGrid。通过禁用,我的意思是应该禁用整个小部件,而不仅仅是它的某个方面(排序、单元格选择等)。

EN

回答 3

Stack Overflow用户

发布于 2011-09-30 02:52:58

您可以尝试使用此处解释的dojox.widget.StandbyLoading indicator with dojo XHR requests。我从来没有在dojox.grid.DataGrid上使用过它,但它应该可以工作...

票数 0
EN

Stack Overflow用户

发布于 2012-05-17 12:26:40

我想你指的是只读网格;在网格的创建中:

代码语言:javascript
复制
 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"));

您可能需要覆盖一些默认行为,例如:

代码语言:javascript
复制
        onHeaderEvent: function (e) {
           //make it do nothing                 

        },

并检查来自http://livedocs.dojotoolkit.org/dojox/grid/DataGrid的其他事件,只需清除所有内容。

在你的css中,你可能需要做这样的事情:

代码语言:javascript
复制
.dojoxGridRowSelected
{
    background-color:none;
    border:none;.....
}

.dojoxGridCellFocus 
{
    border:none;
}

只需从domNodes中查找类名即可

票数 0
EN

Stack Overflow用户

发布于 2016-06-15 21:09:16

使用属性"canSort : false“隐藏或禁用Dojo DataGrid代码中的排序按钮

var newGrid =新的DataGrid({

代码语言:javascript
复制
    id : 'newGrid',

    canSort:false,

    store : this.resultStore,

    structure : this.resultGridLayout,

    autoHeight:true

});

致以敬意,

萨蒂什·M·希雷马特

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7596093

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档