我有一个非常大的treeGrid(一个节点中有2000个元素)。当我单击[+]展开它时,它似乎冻结了。我想将鼠标光标状态更改为单击后的“等待”,但是一旦展开则更改为“默认”。假设我可以将其放在onRowClick或onOpen事件中,但是什么是onComplete事件,可以在其中重置光标?还有没有一种方法/属性来查看行是展开还是折叠?我想改变它的风格。
var layout = [
{
cells: [
[
{ field: "userid", name: "User Id" },
{
field: "childItems",
children: [
{ field: "unid", name: "unid" },
{ field: "username", name: "User Name" },
{ field: "budget", name: "Budget" }
],
aggregate: "sum"
}
]
]
}
]
var jsonStore = new dojo.data.ItemFileWriteStore({ url: <...............>});
var grid = new dojox.grid.TreeGrid(
{
structure: layout,
store: jsonStore,
query: { type: 'userid' },
queryOptions: { deep: true },
rowSelector: true,
openAtLevels: [false],
autoWidth: true,
autoHeight: true,
onRowClick: function (evt) {
var idx = evt.rowIndex,
item = this.getItem(idx);
// ??????
}
},
dojo.byId("treeGrid")
);