Originally Posted by
Vladimir
Hi,
Don't use empty value. Not all browser correct display div/span without content (even if size defined). Please use '& nbsp;' instead empty value
<ext:ComboBox runat="server">
<Items>
<ext:ListItem Text="&nbsp;" Value="0" />
<ext:ListItem Text="Value1" Value="1" />
<ext:ListItem Text="Value2" Value="2" />
<ext:ListItem Text="Value3" Value="3" />
</Items>
</ext:ComboBox>
Here's the javascript
:
id: "Clinic_Size_CD",
xtype: "selectbox",
fieldLabel: "Clinic Size",
boxMinWidth: 300,
dataIndex: "Clinic_Size_CD",
displayField: "Name",
hiddenName: "Clinic_Size_CD_Value",
triggerAction: "all",
valueField: "ID",
store: this.Store2Clinic_Size_CD=new Ext.ux.data.PagingStore({
proxyId: "Store2Clinic_Size_CD",
autoLoad: true,
reader: new Ext.data.JsonReader({
fields: [{
name: "ID"
},{
name: "Name"
}],
idProperty: "ID"
}),
directEventConfig: {},
proxy: new Ext.data.PagingMemoryProxy([{"ID":3,"Name":"Large"},{"ID":2,"Name":"Medium"},{"ID":1,"Name":"Small"}], false),
listeners: {
load: {
delay: 100,
fn: function(store,records,options){if(Clinic_Size_CD.getValue() != 0){Clinic_Size_CD.setValueAndFireSelect(Clinic_Size_CD.value)}else{Clinic_Size_CD.setValue('')};autoSizeList(Clinic_Size_CD);}
}
}
}),
mergeItems: new Ext.data.SimpleStore({fields:["text","value"],data :[[" ","0"]]}),
submitValue: true
},
When it puts the text into the selectbox, it shows the " ":