【发布时间】:2013-12-27 01:44:23
【问题描述】:
我正在尝试在 Dojo Toolkit 中做一个解决方法,您不能通过在其中添加一个只有宽度的虚拟行来在第一行上执行 colspan。创建行后,将使用 onBeforeRow 隐藏行。
请参考以下内容。
这是我的代码:
ConfirmGridGrid = new DataGrid({
store: ConfirmGridDataStore,
structure: [
[
{ width: '35px'}
,{ width: '35px'}
,{ width: '60px'}
,{ width: '60px'}
,{ width: '60px'}
,{ width: '60px'}
,{ width: '25px'}
,{ width: '25px'}
,{ width: '40px'}
,{ width: '25px'}
,{ width: '25px'}
,{ width: '25px'}
,{ width: '240px'}
,{ width: '25px'}
],[
{ name: 'Product Code', field: 'ProductCD', width: '70px', colSpan: 2, editable: false}
,{ name: 'Product Name', field: 'ProductNM', width: '240px', colSpan: 4, editable: false}
// The rest of second column..............................
],[
// Third column..............................
]
],
onBeforeRow: function(inDataIndex, inSubRows){
inSubRows[0].invisible = true;
}
}, "ConfirmGrid");
ConfirmGridGrid.startup();
由于某种原因,onBeforeRow 事件没有被调用。有什么需要补充的吗?还是您需要进行其他事件接线才能使其正常工作? 顺便说一下,我使用的是 Dojo 1.9.1。
【问题讨论】:
标签: dojo dojox.grid.datagrid dojox.grid