是否可以将 chceckboxes 放在 LazyTreeGrid 中?
也许有一些插件会自动更新所选对象并触发 onSelectionChanged 事件?
感谢您的帮助。
最佳答案
树状网格在复选框方面存在错误。
{ 字段:“isSelected”,名称:“Selected”,宽度:“6em”,可编辑:“true”,alwaysEditing:“true”,cellType:“dojox.grid.cells.Bool”
,
将显示复选框。但当您选中/取消选中该值时,它不会为您提供该值。
要修复它,您需要这样做:
{ field: "recvid",name: "Selected", width: "6em",formatter:formatCheckBox}
,
function formatCheckBox(value,rowIndex)
{
var icon;
//var item = e.grid.getItem(rowIndex);
//var itemName = item.itemName.toString();
var id = value + "|" + 'Selected';
//console.log(rowIndex + " "+value);
if (rowIndex!=-1)
{
icon = "<input style=\"vertical-align: middle;\" id='" + id + "' name='grid_item_checkbox' type='checkbox' /> ";
}
return icon;
}
关于javascript - DOJO:dojox.grid.TreeGrid + 复选框如何,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9116755/