1
我使用livegrid查看從服務器數據存儲的所有數據Ext.LiveGrid無法從數據存儲加載數據到網格,但問題是數據存儲可以加載(我使用Firebug檢查控制檯選項卡),但在我的活動網格中無法查看來自加載數據存儲的所有數據,並說'沒有數據顯示'在狀態欄上,請幫我解決這個問題。的Ext JS 3.0.0 - 使用
我使用Ext JS 3.0.0並將Ext.ux.Livegrid添加到我的應用程序中。
這就是我活的格狀構造的代碼:
var myView = new Ext.ux.grid.livegrid.GridView({
nearLimit: 100,
loadMask: {
msg: 'Buffering. Please wait...'
}
});
var livegrid = new Ext.ux.grid.livegrid.GridPanel({
enableDragDrop: false,
cm: new Ext.grid.ColumnModel([
new Ext.grid.CheckboxSelectionModel(),
new SharpJs.RowNumberer()
, { header: 'Nama Kegiatan', dataIndex: 'RCSA_NAME', sortable: true, allowBlank: false }
, { header: 'Unit', dataIndex: 'AUDITEE_NAME', sortable: true, allowBlank: false }
, { header: 'Risk Owner', dataIndex: 'NAMA_RISKOWNER', sortable: true, allowBlank: false }
, { header: 'Kode Kegiatan', dataIndex: 'RCSA_CODE', sortable: true, allowBlank: false, maxLength: 100 }
, { header: 'Periode', dataIndex: 'RISK_PERIOD_NAME', sortable: true, allowBlank: true }
, { header: 'SMART', dataIndex: 'Id', renderer: smartRenderer }
, { header: 'Kajian Risiko', dataIndex: 'Id', renderer: kajRisiko }
, { header: 'Kesimpulan', dataIndex: 'Id', renderer: sumRenderer }
, { header: 'Pengesahan', dataIndex: 'LEGITIMATION_NO', renderer: pengRenderer }
, { header: 'Verifikasi', dataIndex: 'VERIFICATION_NO', renderer: verRenderer }
, { header: 'Mentor', dataIndex: 'AUDITEE_EMPLOYEE_NAME', renderer: coachRenderer }
, { header: 'Rollback', dataIndex: 'Id', renderer: rollRenderer }
, { header: 'Jenis Anggaran', dataIndex: 'TBL_PAR_BUDGET_TYPE_NAME', sortable: true, allowBlank: false }
, { header: 'Anggaran', dataIndex: 'ANGGARAN', sortable: true, allowBlank: false, renderer: Ext.util.Format.indMoney }
, { header: 'Verifikasi', dataIndex: 'VERIFIKASI', sortable: true, allowBlank: true }
, { header: 'Tanggal Pembuatan', dataIndex: 'RCSA_SESSION_DATE', sortable: true, allowBlank: true, renderer: SharpJs.dateRenderer }
, { header: 'Created Date', dataIndex: 'CREATED_DATE', sortable: true, renderer: SharpJs.dateRenderer }
, { header: 'Created By', dataIndex: 'CREATED_BY', sortable: true }
, { header: 'Modified Date', dataIndex: 'MODIFIED_DATE', sortable: true, renderer: SharpJs.dateRenderer }
, { header: 'Modified By', dataIndex: 'MODIFIED_BY', sortable: true }
]),
loadMask: {
msg: 'Loading...'
},
title: 'Daftar Kajian Kegiatan Proyek',
height: SharpJs.FormHeight,
width: SharpJs.FormWidth,
stripeRows: true,
store: new Ext.ux.grid.livegrid.Store({
autoLoad: true,
url: SharpJs.RootUrl + "TblProjRcsas",
bufferSize: 300,
reader: new Ext.ux.grid.livegrid.JsonReader({
root: 'resultset',
versionProperty: 'version',
totalProperty: 'totalCount',
fields: [
'Id'
, 'AUDITEE'
, 'AUDITEE_ID'
, 'AUDITEE_NAME'
, 'TBL_PAR_PROJ_RISK_PERIOD'
, 'RISK_PERIOD_ID'
, 'RISK_PERIOD_NAME'
, 'RCSA_CODE'
, 'RCSA_NAME'
, 'START_DATE'
, 'END_DATE'
, 'CREATED_DATE'
, 'CREATED_BY'
, 'MODIFIED_DATE'
, 'MODIFIED_BY'
, 'ANGGARAN'
, 'VERIFIKASI'
, 'TBL_PAR_BUDGET_TYPE_ID'
, 'TBL_PAR_BUDGET_TYPE_NAME'
, 'RCSA_SESSION_DATE'
, 'RCSA_SESSION_TIME'
, 'RCSA_SESSION_LOCATION'
, 'VERIFICATION_NO'
, 'VERIFICATION_DATE'
, 'VERIFICATION_OWNER'
, 'LEGITIMATION_NO'
, 'LEGITIMATION_DATE'
, 'LEGITIMATION_OWNER'
, 'AUDITEE_RISKOWNER_ID'
, 'NAMA_RISKOWNER'
, 'SURAT_RISKOWNER'
, 'LEGITIMATION_EXA_STATUS'
, 'LEGITIMATION_APPROVE_STATUS'
, 'VERIFICATION_MRF_STATUS'
, 'VERIFICATION_MRO_STATUS'
, 'VERIFICATION_KSMR_STATUS'
, 'AUDITEE_EMPLOYEE_AUDITEE_ID'
, 'AUDITEE_EMPLOYEE_ID'
, 'AUDITEE_EMPLOYEE_NAME'
],
}),
sortInfo: { field: 'Id', direction: 'ASC' },
baseParams: {skip:0, take:15}
}),
selModel: new Ext.ux.grid.livegrid.RowSelectionModel(),
view: myView,
bbar: new Ext.ux.grid.livegrid.Toolbar({
view: myView,
displayInfo: true
})
});
livegrid.render('DataGrid');
,這是我活的網格沒有數據顯示:
http://i.stack.imgur.com/5qtAd.jpg
感謝您的幫助..
我認爲這對商店沒有任何問題,因爲商店已經加載,所有數據都是「讀取」。問題是,商店已經加載,一個livegrid如何從商店中讀取所有數據?我錯過了什麼? – Yanuar
我知道這必須匹配。你可以用返回的json樣本編輯帖子嗎? – Hardrada