私は Dojo を初めて使用し、完全に困惑する問題に遭遇しました。Enhanced Grid を使用して Dojo でデータ・グリッドを作成しています。
グリッドの各行には、行を選択できるチェックボックスがあります。チェックボックスは、indirectselection プラグインを使用して実装されています。
チェックボックスを使用して行を選択すると、すべて正常に動作します。しかし、他のデータセルをクリックして行を選択すると、行が選択されません!
データグリッドの 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