카테고리 없음2011. 7. 6. 10:33

comboboxA.on("change", function(cb, newValue, oldValue){

    if(newValue == "USA"){
       comboboxB.store.loadData(["Texas", "New York", "Washington"]);
       comboboxB.setValue("Texas");
    }
    else if(newValue == "England"){
       comboboxB.store.loadData(["London", "Manchester"]);
       comboboxB.setValue("London");
    }

});
Posted by 베니94
자바스크립트/Ext JS2011. 7. 6. 10:31

// or an object with an Ext.data.Field ('dynamic') 
var fields = ['totally', {name : 'dynamic', type : 'string'}]; 
var newStore = new MyApp.store.Object({ 
  fields
: fields 
 
// other options like proxy, autoLoad... 
}); 

Don't specify a model property - it seems that it would override the fields property.

I also wanted to change the columns and content of an existing grid dynamically:

// reconfigure the grid to use the new store and other columns 
var newColumns = [ 
 
{header: 'Totally', dataIndex: 'totally'}, 
 
{header: 'Dynamic', dataIndex: 'dynamic'} 
]; 
myGrid
.reconfigure(newStore, newColumns); 

'자바스크립트 > Ext JS' 카테고리의 다른 글

Event Observer  (0) 2011.07.17
property.Grid에 사용자 콤보 추가.  (2) 2011.07.06
Ext 3 to 4 Migration  (0) 2011.07.04
경고창에 이벤트 주기  (0) 2011.07.01
form 요소 전체 보기  (0) 2011.07.01
Posted by 베니94
자바스크립트/Ext JS2011. 7. 4. 21:32
/** JSON.decode의 버젼별 코드 
*/
// ExtJS 3
obj = Ext.util.JSON.decode(action.response.responseText);

// ExtJS 4
obj = Ext.JSON.decode(action.response.responseText);

'자바스크립트 > Ext JS' 카테고리의 다른 글

property.Grid에 사용자 콤보 추가.  (2) 2011.07.06
reconfigure  (0) 2011.07.06
경고창에 이벤트 주기  (0) 2011.07.01
form 요소 전체 보기  (0) 2011.07.01
ExtJs Ajax  (0) 2011.06.27
Posted by 베니94