Load combobox when opening

Page 1 of 2 12 LastLast
  1. #1

    Load combobox when opening

    Is it possible to load the combobox only when opening the combox list.
    So the next time a user opens the combobox, the load doesn't need to be executed anymore.

    If this can be possible, then my page would load 3 times faster.
    Because now, when i load my grid, i also load the filters (comboboxes) of my grid, but that is only neccessary when the users want to get use of the filters.

    Regards
  2. #2
    Hi,

    Just use Store with proxy (PageProxy or HttpProxy)
  3. #3
    But when i use proxy, then the stores will be loaded when i open my page, and i want to avoid that. I only want to load the store when you the user clicks on the trigger.
  4. #4
    which other settings do i need to set that my combobox only loads when expanding.


     
    <ext:Store ID="StoreForwarder" AutoLoad="false" runat="server">
        <SortInfo Field="CTDOfficialName" Direction="ASC" />
        <Reader>
     <ext:JsonReader IDProperty="ID">
         <Fields>
      <ext:RecordField Name="ID" /> 
      <ext:RecordField Name="CTDOfficialName" SortType="AsUCString" />               
         </Fields>
     </ext:JsonReader>
        </Reader>
        <Listeners>
       <LoadException Handler="Ext.Msg.alert('Load forwarders failed', (!Ext.isEmpty(e) && !Ext.isEmpty(e.message)) ? e.message : response.statusText);" />
      </Listeners>
    </ext:Store>
     
    <ext:ComboBox ID="ForwarderFilter" runat="server" 
        StoreID="StoreForwarder"                                                     
        ValueField="ID"
        DisplayField="CTDOfficialName"
        Mode="Local"                                                                                                               
        >    
        <Items>
     <ext:ListItem Text="" Value="-1" />
        </Items>                                                                                                                   
    </ext:ComboBox>
    Last edited by Birgit; Mar 15, 2011 at 9:50 AM.
  5. #5
    Hi,

    If you set AutoLoad="false" for a store then data request will be initiated by combobox before expand
  6. #6
    Maybe i expressed myself wrong, it is actually the store that only may be loaded from the moment that the combobox is expanded.
    Next time the combobox is expanded,the store doesn't need to be loaded anymore.
  7. #7
    Hi,

    Do not use Mode="Local" (must be Remote) and don't use inner items (only store)
  8. #8
    Hi Vladimir,

    The store isn't loading at all anymore:

    <ext:Store ID="StoreForwarder"  AutoLoad="false" runat="server" OnRefreshData="StoreForwarder_Refresh" >
        <SortInfo Field="CTDOfficialName" Direction="ASC" />
        <Reader>
     <ext:JsonReader IDProperty="ID">
         <Fields>
      <ext:RecordField Name="ID" /> 
      <ext:RecordField Name="CTDOfficialName" SortType="AsUCString" />               
         </Fields>
     </ext:JsonReader>
        </Reader>
        <Listeners>
       <LoadException Handler="Ext.Msg.alert('Load forwarders failed', (!Ext.isEmpty(e) && !Ext.isEmpty(e.message)) ? e.message : response.statusText);" />
      </Listeners>
    </ext:Store>
     
    <ext:ComboBox ID="ForwarderFilter" runat="server" 
        StoreID="StoreForwarder"                                                     
        ValueField="ID"
        DisplayField="CTDOfficialName"                                                                                           
        />
  9. #9
    Hi,

    Please read my first post
    Just use Store with proxy (PageProxy or HttpProxy)
    You have to use proxy
  10. #10
    Thanx a lot!!!

    You can mark this as solved
Page 1 of 2 12 LastLast

Similar Threads

  1. Problem with load record into ComboBox
    By JosefTrbusek in forum 2.x Help
    Replies: 3
    Last Post: Sep 09, 2012, 7:02 AM
  2. [CLOSED] Double load in combobox
    By FVNoel in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 02, 2012, 9:29 AM
  3. Combobox isn't load correctly
    By flaviodamaia in forum 1.x Help
    Replies: 0
    Last Post: Mar 29, 2010, 9:19 AM
  4. Load ComboBox
    By usantos in forum 1.x Help
    Replies: 0
    Last Post: Mar 13, 2010, 12:29 PM
  5. combobox not load data
    By maxdiable in forum 1.x Help
    Replies: 2
    Last Post: Feb 05, 2010, 12:48 PM

Posting Permissions