PDA

View Full Version : Combobox paging tool bar not refreshing on collapse.



sachin sachdeva
29 Mar 2011, 5:11 AM
Hi. I am using a combobox paging tool bar which is working fine but my problem is when it collapses it is not refreshing and on the next search it is showing previous search results until whole search has been completed.I want paging toolbar to refresh on collapse .Plz find the attached screen shot. My code is


var search = new Ext.form.ComboBox({
store : dsCombo,
mode : 'remote',
//displayField : 'fileName',
id : 'searchclrid',
typeAhead : false,
loadingText : 'Searching...',
width : 370,
pageSize : 10,
minLength : 0, // 5
maxLength : 250,
hideTrigger : true,
tpl : resultTpl,
emptyText : 'Enter minimum 3 characters...',
applyTo : 'search',
queryParam : 'searchKeyword',
itemSelector : 'div.search-item',
nocache : false,
validateOnBlur : true,
minChars : 3,
listeners : {
blur : function() {
Ext
.getCmp("searchclrid")
.setValue("Enter minimum 3 characters...");
},
focus : function() {
Ext.getCmp("searchclrid").clearValue();
},
keyup : function() {
var dcsKeyword = Ext.getCmp("searchclrid")
.getValue();
if (dcsKeyword.length > 3) {
dcsMultiTrack('DCS.dcsuri',
'/amp/keywords/' + dcsKeyword,
'WT.dl', '0');
}
if (Ext.getCmp("searchclrid").getValue().length < 3) {

if (this.isExpanded()) {
this.collapse();
}
}
},
specialkey : function(password, el) {
if ((el.getKey() == Ext.EventObject.ENTER)) {
EnterKey();
}
},

collapse : function() {
Here I think i need to write some code to refresh it again on next search
}
}