Jan 02, 2013, 3:50 PM
Migration 1.0 - 2.1 grid and comboBox with autoload stores
Hello,
I have a grid and a comboBox, both with autoload = true
The grid uses the combobox value as a parameter. In my old 1.0 version I had this statement:
But the problem even might be somewhere else:
In my page_load event I am setting the comboBox Value to the last searched value.
I have the felling that SetValue() gets overwritten by the ComboBox Autoload event, the box is filled but there is no selected value, so this might be NULL.
And there is still another issue with the combox now, it gets filled twice somehow. If I press the dropdown button, its firing the readdata event again, but behind the loadmask you can already see the values. From this moment on, it doesnt reload, just like it should be.
I have a grid and a comboBox, both with autoload = true
The grid uses the combobox value as a parameter. In my old 1.0 version I had this statement:
<ext:ResourceManager ID="ResourceManager1" runat="server">
<Listeners>
<DocumentReady Handler="#{GridStore}.load();" />
</Listeners>
</ext:ResourceManager>
It seems like this does not work anymore in 2.1, the gridstore gets NULL as a parameter. <ext:Store ID="ComboBoxStore" runat="server" AutoLoad="true">
<Proxy>
<ext:PageProxy />
</Proxy>
<Model>
<ext:Model ID="Model1" runat="server">
<Fields>
<ext:ModelField Name="Name" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
<ext:Store ID="ResultsStore" runat="server" AutoLoad="true" >
<Proxy>
<ext:PageProxy />
</Proxy>
<Model>
<ext:Model runat="Server">
<Fields>
<ext:ModelField Name="Amount" Type="Int" />
.
.
.
</Fields>
</ext:Model>
</Model>
<Parameters>
<ext:StoreParameter Name="Date" Value="#{DateField}.getValue()" Mode="Raw" />
<ext:StoreParameter Name="cbValue" Value="#{MyComboBox}.getValue()" Mode="Raw" />
</Parameters>
</ext:Store>
So I would need a way to ensure that the grid-store loads after the combobox has been filled. I've tried some Listeners, didnt found the right one yet.But the problem even might be somewhere else:
In my page_load event I am setting the comboBox Value to the last searched value.
Me.MyComboBox.SetValue(lastSearched)
If the grid store would just take this one as a parameter, all would be fine, but the store gets NULL as a parameter even if lastSearched is a valid string.I have the felling that SetValue() gets overwritten by the ComboBox Autoload event, the box is filled but there is no selected value, so this might be NULL.
And there is still another issue with the combox now, it gets filled twice somehow. If I press the dropdown button, its firing the readdata event again, but behind the loadmask you can already see the values. From this moment on, it doesnt reload, just like it should be.