PDA

View Full Version : Combo box not retaining Selection



msuresh
15 Feb 2011, 5:29 AM
Hi,

I have a grid and a combobox in one of the cell. When I click on the Combo, it loads store and displays values using Template. When I click any value, that item is not getting selected. It shows default text set in "emptyText". How to resolve this issue?



editor : new Ext.grid.GridEditor(new Ext.form.ComboBox({
store : new Ext.data.JsonStore({
url : 'http://localhost/logview/asuprange',
autoLoad:true,
root:'asupRange',
method : 'GET',
fields : [{name: 'asupDate', mapping: 'asupDate', type: 'date', dateFormat: 'U'},
'asupId', 'asupTitle', 'hostName']
}),
mode : 'remote',
editable: false,
valueNotFoundText: 'Select ASUP',
loadingText: 'Searching...',
tpl: '<tpl for="."><div class="search-item">' +
'<span>{asupDate:date("D M d Y, H:i T")}</span>' +
'{asupTitle}' +
'</div></tpl>',
minListWidth: 400,
minListHeight:200,
selectOnFocus:true,
itemSelector: 'div.search-item',
valueField : 'asupId',
displayField : 'asupDate',
forceSelection:true,
triggerAction : 'all',
emptyText : 'Select Date',
allowBlank:false
}), {
listeners : {
beforestartedit : function(editor) {
var combo = editor.field, record = editor.record;
combo.rowIndex = editor.row;
}
}
})


Regards,
Suresh

msuresh
15 Feb 2011, 6:11 AM
Missing Condor :(

msuresh
15 Feb 2011, 7:31 AM
Got it. I was using renderer and I didn't see it.

darthwes
15 Feb 2011, 8:12 AM
Hold the phone, what happened to Condor? WHERE ARE YOU CONDOR?