extjs grid에서 dataStore를 모두 불러왔을때 이벤트 처리를 해야할 경우가 생겼다.
이전의 삽질을 바탕으로 listener를 먼저 생각했고, 이벤트는 onLoad, afterLoad 등 하다가 단순하게 load를 하니 작동한다.
이전의 삽질을 바탕으로 listener를 먼저 생각했고, 이벤트는 onLoad, afterLoad 등 하다가 단순하게 load를 하니 작동한다.
// create the Data Store
store = Ext.create('Ext.data.Store', {
pageSize: 20,
model: 'QnA',
//remoteSort: true,
proxy: new Ext.data.HttpProxy({
extraParams : jQuery('form[name="searchForm"]').formParams(),
url: REMOTE_URL,
reader: new Ext.data.JsonReader(
{ root: 'datas', totalProperty: 'totalCount'}
)}
),
listeners: {
load: function(dataStore, rows, bool) {
console.log(dataStore);
console.log(rows);
console.log(bool);
},
scope: this
}
});
'웹 개발 > extjs4' 카테고리의 다른 글
| Ext.create() and Ext.widget() 의 차이점... (0) | 2013.07.26 |
|---|---|
| Ext.Ajax (0) | 2013.07.22 |
| extjs grid 헤더 통합 및 하단 합계 추가. (0) | 2012.04.27 |
| extjs grid double click event (0) | 2012.04.23 |
| extjs grid 헤더와 컬럼 따로 정렬하기 (0) | 2012.04.23 |