Dojo Grid:来自商店的数据未显示,它只显示标题

时间:2014-02-13 13:25:38

标签: dojo

我有以下代码:

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();

问题是它只显示了网格标题。没有其他数据。那可能有什么问题?

0 个答案:

没有答案