Combobox doesn't collapse

  1. #1

    Combobox doesn't collapse

    Hi,
    I have a combobox on a page. After selecting an item, the dropdown list does not collapse after selecting. I have to click on somewhere on page to force it collapse. How can I get over this? Please help.
    
    
    
    <ext:ComboBox runat="server" ID="cmbogroup4" StoreID="StoreGroup" 
    
    
    DisplayField="Category" ValueField="catid" FieldLabel="Select a group">
    
    
    <AjaxEvents>
    
    
    <Select OnEvent="cmbogroup4_ValueChanged">
    
    
    <EventMask ShowMask="true" Msg="Loading..." />
    
    
    </Select>
    
    
    </AjaxEvents>
    
    
    </ext:ComboBox>
    
    
    
    
    protected void cmbogroup4_ValueChanged(object sender, EventArgs e)
    
    
    {
    
    
    dshomepage.SelectParameters[0].DefaultValue = cmbogroup4.SelectedItem.Value;
    
    
    StoreHomepage.DataBind();
    
    
    Formedithomepage.DataBind();
    
    
    }
    Thanks, I appreciate your help.
    Kamal
  2. #2

    RE: Combobox doesn't collapse



    Hi,


    I have similar problem. I have linked Comboboxes. After selecting value in first Combo, values in second one are loading properly. But first Combo doesn't collapse. As in Kamal's case, I have to click somewhere else to collapse this first Combo.
    I've tried to use in select handler focus() method to second Combo and collapse() method to first Combo, but it doesn't work.


    Any help?


    All the best,


    Zbyszek
  3. #3

    RE: Combobox doesn't collapse

    Same problem here. My combobox looks as follows:

    <ext:ComboBox ID="cbxOptionLists" runat="server" StoreID="stoOptionLists" DisplayField="Name" ValueField="Type" Editable="false" ForceSelection="true">
        <Listeners>
            <Change Handler="#{stoOptions}.reload();" />
        </Listeners> 
    </ext:ComboBox>
    Nothing special. Basicaly it should just reload a store which is used by a GridPanel. The problem is, that after the reload is made, the ComboBox ist displayed in expanded mode again.

    If I add a listener for the 'select' event, then i have to click somewhere on the page (blur the ComboBox) to execute the event. This would work in the way that the ComboBox is not displayed as expanded anymore but the handling like this is somehow wacky..

    Cheers, Martin

  4. #4

    RE: Combobox doesn't collapse

    Hi,

    You need to create simple example which we can test. We will test that example and try to fix the problems if we can reproduce it
  5. #5

    RE: Combobox doesn't collapse

    Hi,

    I gave an example of my code in my query. thanks.
  6. #6

    RE: Combobox doesn't collapse

    Hi,

    I can't reproduce the problem based on your code. I need full sample which we can test without any changes on our side
  7. #7

    RE: Combobox doesn't collapse

    The attached example shows the behavior with a listener to the select event of the ComboBox. Please check it also with a listener to the change event.

    Hope this helps to solve the described problem.

    Cheers, Martin
  8. #8

    RE: Combobox doesn't collapse

    Hi Martin,

    I did not test your example but after quick review I think know what the problem: you should wrap code in Page_Load with
    if(!Ext.IsAjaxRequest){...code from Page_Load}

    Otherwise you will reload combobox on each ajax request (for example, you reload combo when reload the grid)
  9. #9

    RE: Combobox doesn't collapse

    Thanks Vladimir!

    Short answer, quick answer and correct answer! You were absolutely right. Now the ComboBox works as expected.
    For me the problem can be seen as solved.


    Thanks again for your great support!
  10. #10

    RE: Combobox doesn't collapse

    Hi,
    Wow, first thank you Martin for providing the sample and a very BIG thank you to Vladsch to give us the best answer.

    THANK YOU,
    Kamal

Similar Threads

  1. [CLOSED] ComboBox inside DropDownField causes it to collapse on item selection
    By Leonid_Veriga in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 13, 2014, 12:43 PM
  2. Replies: 3
    Last Post: Aug 11, 2011, 11:07 AM
  3. Combobox still collapse after SelectItem
    By zizoovic in forum 1.x Help
    Replies: 0
    Last Post: Jan 18, 2011, 2:26 PM
  4. Replies: 6
    Last Post: Nov 18, 2010, 9:03 PM
  5. Replies: 4
    Last Post: Dec 16, 2008, 3:44 PM

Posting Permissions