간단한 그리드 는 JSON 형식 MYDATA 3 열 주제 아이디, 주체 이름 및 제목 짧은 이름 .. 을 표시하려고 JSON 데이터를 얻을려고 ... 세 열 표시 데이터가 저장됩니다. myData에 대해 서버에서받은 데이터를 방금 붙여 넣었습니다. 데이터가 표시되지 않는 이유를 모르겠습니다. 데이터 그리드에 표시되지 않는 이유 으로수없는
var myData = {"subjectStoreRoot":[{"subjectName":"Chemistry","subjectId":"Chem01","subjectShortName":"Chemistry"},{"subjectName":"Mathematics","subjectId":"Math01","subjectShortName":"Maths"},{"subjectName":"English","subjectId":"Eng01","subjectShortName":"Eng"},{"subjectName":"Science","subjectId":"Sci01","subjectShortName":"Sci"},{"subjectName":"Social Studies","subjectId":"SS01","subjectShortName":"Social"},{"subjectName":"Kannada","subjectId":"Kan01","subjectShortName":"Kan"}]};
store = new Ext.data.ArrayStore({
data:Ext.decode(myData),
//
autoDestroy : true,
autoLoad:true,
storeId: 'subjectsGridStoreId',
// reader configs
root: 'subjectStoreRoot',
//
idProperty: 'subjectId',
fields: [
{name: 'subjectId' ,type:'string'},
{name: 'subjectName' ,type:'string'},
{name: 'subjectShortName' ,type:'string'}
]
});
grid = new Ext.grid.GridPanel({
store: store,
stripeRows:true,
scrollable:true,
columnLines:true,
columns: [
{
id :'subjectId',
header : 'Subject Id',
width : 250,
sortable : true,
dataIndex: 'subjectId'
},{
id :'subjectName',
header : 'Subject Name',
width : 250,
sortable : true,
dataIndex: 'subjectName'
},{
id :'subjectShortName',
header : 'Subject Short Name',
width : 250,
sortable : true,
dataIndex: 'subjectShortName'
}
],
// autoExpandColumn: 'subjectName',
height: 300,
// width: 350,
autoScroll:true,
title: 'List of all Subjects',
// config options for stateful behavior
stateful: true,
stateId: 'grid'
});
는 안내하세요?
게시물을 수정하는 것이 좋습니다. –
죄송합니다 .. 이제 수정되었습니다 .. 지금 데이터가로드되지 않는 이유를 제안하십시오 – JackAss