mardi 30 décembre 2014

EXTJS 3.2 editorgrid How to set focus to next cell

from a combo box I get the value to (sat_beli,kon_beli,satuan), I want to set focus to next cell (start edit). Can U help please


Code:



{
dataIndex : 'kode_sub',
header : 'Kode Stock',
width : 160,
align : 'left',
editor : {
xtype : 'combo',
allowBlank : true,
mode : 'local',
store : ds_stock,
selectOnFocus: true,
listClass : 'x-combo-list-small',
typeAhead : true,
displayField : 'kode_sub',
itemSelector: 'div.column-center-akun',
valueField : 'kode_sub',
tpl : resultTpl_stock,
listWidth : 600,
lazyRender : true,
listeners: {
select : function(combo,e,rec) // 'select' will be fired as soon as an item in the ComboBox is selected with mouse, keyboard.
{
var invoice = this.getValue(); // get value from combo
var index = this.getStore().findExact('kode_sub',invoice) // compare value from combo to field acct_no and returns the index
var record = this.getStore().getAt(index); // get record at the index
//alert(record);
var processed1 = record.get('sat_beli'); // return value of field acct_name
var processed2 = record.get('konv_beli');
var processed3 = record.get('satuan');
//alert(processed);
var oSM = gridDetail.getSelectionModel();
var oGrid = Ext.getCmp('grid-Detail');
oGrid.startEditing(oSM.getSelectedCell()[0],oSM.getSelectedCell()[1]);
oGrid.getStore().getAt(oSM.getSelectedCell()[0]).set('sat_beli',processed1);
oGrid.getStore().getAt(oSM.getSelectedCell()[0]).set('konv_beli',processed2);
oGrid.getStore().getAt(oSM.getSelectedCell()[0]).set('satuan',processed3);


oGrid.stopEditing(false);

}

}


}
}





EXTJS 3.2 editorgrid How to set focus to next cell

Aucun commentaire:

Enregistrer un commentaire