我有以下代码:
var items = [{status:"Active",comments:null,id:31,updated_by:"system",note:null},
{status:"Pending",comments:null,id:30,updated_by:"system",note:null}];
var storeH = new dojo.data.ItemFileWriteStore({
data : {
identifier:"id",
items : items
}
});
var layoutH = [
{ field: 'id', name: 'ID', width: '20px' },
{ field: 'comments', name: 'Comments', width: '100px' },
{ field: 'status', name: 'Status', width: '60px' },
{ field: 'updated_by', name: 'Updated By', width: '60px' },
{ field: 'note', name: 'Notes', width: '100px' }
];
var gridH = new dojox.grid.DataGrid({
store: storeH,
autoHeight:true,
structure: layoutH,
id: "account-history-grid"
}, document.createElement('div'));
gridH.startup();
问题是它只显示了网格标题。没有其他数据。那可能有什么问题?