我是 Dojo 的新手,遇到了一个让我完全难过的问题。我正在使用增强型网格在 Dojo 中创建数据网格。
网格中的每一行都有一个复选框,可以使用该复选框来选择该行。该复选框已使用间接选择插件实现。
现在,当我使用复选框选择一行时,一切正常。但是,当我通过单击其他数据单元格来选择一行时,该行不会被选中!
这是数据网格的 JSP 部分
<table data-dojo-id="grid" data-dojo-type="dojox.grid.EnhancedGrid" plugins="{indirectSelection: {headerSelector:true}, filter: true,pagination: true}"
data-dojo-props="store:icGrid,
clientSort:true " formatterScope="myFormatters"
style="width: 100%; height: 20em;">
<thead>
<tr>
<th width="25%" field="empNo" formatter="formatLink">empNo</th>
<th width="25%" field="name">name</th>
<th width="25%" field="email">email</th>
<th width="25%" field="phone">phone</th>
</tr>
</thead>
</table>
如果我删除了引用间接选择的代码 (plugins="{indirectselection...),当我单击其他数据单元格时,这些行会被选中(因为它们应该如此)。但我还需要实现间接选择的复选框。
有没有办法在不取消行选择功能的情况下使间接选择工作?
看看我将在下面链接的页面中的网格。我需要一个像这样工作的网格(页面中带有复选框的最后一个网格)
http://dojotoolkit.org/documentation/tutorials/1.8/working_grid/demo/selector.php