Hi,
I am new in your forums, i download your book (EXT JS in action) it is greate i read till chapter 6 (using EXT js 4.0.2 version not extjs 3).
i try remote comboBox with my data, i success to display my companies in combobox but paging not working and data filtering also.
i need to know data paging and filtering in comboBox need extra code to do those function or what?
my app.js as following:
var remoteJsonStore = Ext.create('Ext.data.JsonStore',{
root : 'records', // 1
baseParams : { // 2
column : 'cmpany_name'
},
totalProperty : 'totalCount',
fields : [ // 3
{
name : 'name',
mapping : 'cmpany_name'
},
{
name : 'stock',
mapping : 'stock'
}
],
proxy: {
type: 'ajax',
url:'data/livesearch.aspx',
method: 'POST',
reader: {
root: 'companies'}
}
});
var combo = {
xtype : 'combo',
fieldLabel : 'Search by name',
forceSelection : true, // 5
pageSize : 20,
displayField : 'name', // 6
valueField : 'stock', // 7
hiddenName : 'customerId', // 8
loadingText : 'Querying....', // 9
minChars : 1, // 10
triggerAction : 'name', // 11
store : remoteJsonStore
};
Ext.onReady(function(){
var fp=Ext.create('Ext.form.FormPanel',{
renderTo : Ext.getBody(),
width : 400,
height : 160,
title : 'Exercising textfields',
frame : true,
bodyStyle : 'padding: 6px',
labelWidth : 126,
defaultType : 'textfield', // 1
defaults : {
msgTarget : 'side', // 2
anchor : '-30'
},
items : combo
});
});
i retrieve my data as you mentioned data structure array.
can you help me in this issue as i am very new in Ext js.
Thanks.
|