Código:
app.ComboClientes = function(config) {
var config = config || {};
var storeClientes = new Ext.data.JsonStore({
url: 'BuscarClientes',
root: 'registros',
baseParams:{start:0, limit:-1, sort:'nombre', dir:'asc'},
fields: app.clienteRecord
});
Ext.applyIf(config,{
fieldLabel: '<b>Cliente</b>',
store : storeClientes,
hiddenName:'id_cliente',
valueField:'id',
displayField:'nombre',
typeAhead: true,
mode: 'remote',
minChars:2,
triggerAction: 'all',
emptyText:'Selecciona Cliente..',
selectOnFocus:true,
forceSelection:true,
anchor:'90%',
allowBlank:false
});
// call the superclass's constructor
app.ComboClientes.superclass.constructor.call(this, config);
};
Ext.extend(app.ComboClientes, Ext.form.ComboBox);
var comboClientes = new app.ComboClientes({
listeners:{
select: function(combo, reg){
comboCptLineaCobro.actualizar();
formConceptoCobro.inicializar();
},
change: function(){
gridConceptosCobro.inicializar();
}
}
});
comboClientes.store.load();


