PDA

View Full Version : [CLOSED] question about combobox refresh



feanor91
Jun 18, 2012, 9:59 AM
Hello

I have 2 combobox to display linked to their store. Those store are loaded on main page load. When I expand my combo, the load is redone but I already have the data in the comb (I can see it). Question : is there a way to not fire the load when expand is trigered?

Daniil
Jun 18, 2012, 11:42 AM
Hi,

I think you should set up

AutoLoad="false"
for the Stores.

feanor91
Jun 18, 2012, 11:58 AM
Yes, but in this case , is my store will be loaded as startup, or I will have to initiate the load? I think second but just to be sure. I give it a try just now.

Daniil
Jun 18, 2012, 12:32 PM
Yes, but in this case , is my store will be loaded as startup, or I will have to initiate the load? I think second but just to be sure.

I do not know for sure how your Stores are configured. But, according to the details you have provided in the initial post, I guess the Stores are configured with Proxy. In that case setting up

AutoLoad="false"
for such Store will cause:

1. The Store won't load its data on the initial page load.
2. The Store will automatically load its data when a user will expand the ComboBox.

feanor91
Jun 18, 2012, 12:43 PM
I do not know for sure how your Stores are configured. But, according to the details you have provided in the initial post, I guess the Stores are configured with Proxy. In that case setting up

AutoLoad="false"
for such Store will cause:

1. The Store won't load its data on the initial page load.
2. The Store will automatically load its data when a user will expand the ComboBox.

OK, I want excacly inverse function.

Here a store example:


<ext:Store ID="stoChartsName" runat="server" AutoLoad="False">
<Proxy>
<ext:AjaxProxy Url="jsonDAL/ReturnJsonChartsName.aspx" Json="false" Timeout="300000" >
<Reader>
<ext:JsonReader Root="Data" TotalProperty="TotalRecords" >
</ext:JsonReader>
</Reader>
</ext:AjaxProxy>
</Proxy>
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="INT_idCharts" Type="Int" />
<ext:ModelField Name="STR_FriendlyName" type="String" />
<ext:ModelField Name="STR_ChartName" type="String" />
</Fields>
</ext:Model>
</Model>
</ext:Store>

Daniil
Jun 18, 2012, 1:15 PM
Then

QueryMode="Local"
for the ComboBox should help.

feanor91
Jun 18, 2012, 1:24 PM
Then

QueryMode="Local"
for the ComboBox should help.

Yes it does...Is there a trick to use this?

Daniil
Jun 18, 2012, 1:33 PM
s there a trick to use this?

I am afraid I don't understand the question. Please clarify.

feanor91
Jun 18, 2012, 1:42 PM
Is there a side effect to use this property?

Daniil
Jun 18, 2012, 1:54 PM
I think, no.

feanor91
Jun 18, 2012, 2:02 PM
good thanks.