PDA

View Full Version : Combobox changes to default value on refreshing the grid through painging bar



sachin sachdeva
28 Mar 2011, 4:30 AM
here is my combo box code my problem is every time i refresh the grid through paging bar the combobox value changes to default value.........


var search = new Ext.form.ComboBox({
store : ds,
mode : 'remote',
displayField : 'fileName',
id : 'searchclrid',
typeAhead : false,
loadingText : 'Searching...',
width : 370,
pageSize : 10,
minLength : 0, // 5
maxLength : 250,
hideTrigger : false,
tpl : resultTpl,
emptyText : 'Enter minimum 4 characters...',
applyTo : 'search',
queryParam : 'searchKeyword',
itemSelector : 'div.search-item',
nocache : false,
validateOnBlur : true,
listeners : {
blur : function() {
Ext
.getCmp("searchclrid")
.setValue("Enter minimum 4 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 < 4) {
if (this.isExpanded()) {
this.collapse();
}
}
},

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

}

}


},



I want that searched value should stay there even after grid is refreshed.....