PDA

View Full Version : problem with searchfield



ApacheLogs
16 Nov 2009, 8:01 AM
hi,
im creatin a tbar and i would like to include a searchfield int it but the problem is when i click it reload store but data does'nt be reloaded
can any one help me please?


tbar: [
'Recherche: ', ' ',
new Ext.app.SearchField({
store : store_detail_files,
emptyText : 'Nom du fichier rechercher...',
width :250,
params : {start: 0, limit: 5,idcont:2}, // new property
beforeClear : function(){alert('vai limpar');}, // new method
afterClear : function(){alert('limpou')},// new method
beforeSearch : function(){alert('vai procurar');},// new method
afterSearch : function(){alert('procurou')}// new method
})
],

MrRoyce
17 Nov 2009, 6:04 PM
If you are using the 'modified' searchField from http://extjs.net/forum/showthread.php?p=406607 I noticed a couple of bugs in it.

The function definition, the beforeSearch, and afterSearch are misspelled - both are missing the 'r'
beforeSeach: function(){},
afterSeach: function(){},


also the 'callback' function is misspelled as 'callBack' - the 'b' should not be uppercase.

ApacheLogs
18 Nov 2009, 3:32 AM
Thanks for replying
The problem persist when i eliminate these functions
when i click to search the store is reloading but the grid dont relaod data
did i have to pass something in paraater in the store??

this is the searcfield


new Ext.ux.form.SearchField({
store : store_detail_files,
emptyText : 'Nom du fichier rechercher...',
width : 250,
params : {start: 0, limit: 50}
})

And i pass in param only this :


Ext.getCmp('griddetailfiles').getStore().reload({params:{start:0, limit:10,idc:id}});

when i reload the store in another part of my code