【发布时间】:2016-07-28 18:23:12
【问题描述】:
我正在使用 DOJO 数据网格 1.10 版我想要的是在选项卡上索引网格中的行应该突出显示,以便用户能够知道焦点在哪一行。但我没有获得行焦点。
【问题讨论】:
我正在使用 DOJO 数据网格 1.10 版我想要的是在选项卡上索引网格中的行应该突出显示,以便用户能够知道焦点在哪一行。但我没有获得行焦点。
【问题讨论】:
您可以收听dojox.grid.DataGrid::onCellFocus 事件。事件参数是焦点cell-Object 本身和对应的rowIndex。
function onCellFocus(cell, rowIndex) {
// first clear selection
grid.selection.clear();
// select the focused row
grid.selection.setSelected(rowIndex, true);
// invoke manually the render method
grid.render();
}
我已经为你创建了一个工作小提琴,可以找到 here。
【讨论】: