Feb 10, 2011, 10:16 PM
Combobox loses its list of items
I have a combobox with a store defined insie the combo markup. When the page loads I call a special routine to populate the store's datasource and bind it. Sure enough, when the page loads I get results.
Also on the page is a gridpanel with a store and a linqdatasource. This datasource uses the selected value from the combobox to populate the grid.
If the combobox is outside the gridpanel everything works as expected. If the combobox is defined in the gridpanel's top toolbar it does not.
Making a selection in the combobox refreshes teh grid ok but the combobox then loses all it's items except for the selection that was made.
So inside the grid panel the combobox loses its items, outside the panel it does not. The same call to reload the grid's store is made both times.
Also on the page is a gridpanel with a store and a linqdatasource. This datasource uses the selected value from the combobox to populate the grid.
If the combobox is outside the gridpanel everything works as expected. If the combobox is defined in the gridpanel's top toolbar it does not.
Making a selection in the combobox refreshes teh grid ok but the combobox then loses all it's items except for the selection that was made.
So inside the grid panel the combobox loses its items, outside the panel it does not. The same call to reload the grid's store is made both times.
<Listeners>
<Select Handler="#{stFolders}.reload();" />
</Listeners>
All I want to do is load the combobox once and have it persist.<ext:ComboBox ID="MyUsers"
runat="server"
DisplayField="DisplayName"
ValueField="UserID"
LoadingText="Searching..."
Width="200"
Mode="Local"
Editable="true"
TypeAhead="true"
ForceSelection="true"
EmptyText="Select a user..."
Resizable="true"
SelectOnFocus="true">
<Store>
<ext:Store ID="stMyUsers" runat="server" AutoLoad="true">
<Reader>
<ext:JsonReader IDProperty="UserID">
<Fields>
<ext:RecordField Name="UserID" Type="Int" />
<ext:RecordField Name="DisplayName" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
<Listeners>
<Select Handler="#{stFolders}.reload();" />
</Listeners>
</ext:ComboBox>