2011-11-24 63 views
0

我对Datagrid有点问题。Dojo,DataGrid并禁用行选择

我想禁用我的数据网格中的行选择,但我不知道该怎么做。 我试过setAttribute('disabled',true)和Co.但它不工作。

所以,如果你有任何想法做到这一点。

谢谢。

回答

1

在网格上将selectionMode属性设置为“none”。

<div data-dojo-type="dojox.grid.DataGrid" data-dojo-props="selectionMode:'none'"> 
    <!-- [...] --> 
</div> 

,或者编程:

grid = new dojox.grid.DataGrid({ 
      id: 'grid', 
      store: store, 
      structure: layout, 
      selectionMode : 'none'}, 
     someNode);