[CLOSED] Unable to clear Combobox store filter

  1. #1

    [CLOSED] Unable to clear Combobox store filter

    I have an add/edit form with a combo box in my web application, where I am using the same form to add multiple records.

    <ext:TemplateColumn runat="server" ID="RelationshipType" Text="Relationship Type" DataIndex="RelationshipType" Width="300">
                            <Template runat="server">
                                    <Html>
                                    <span>{RelationshipDescription} {RelationshipTypeSuffix}</span>
                                </Html>
                            </Template>
                            <Editor>
                                <sds:ComboBox ID="ddlRelationshipType" runat="server" AllowBlank="false" IDMode="Static"
                                    DisplayField="Value" ValueField="Key" Mode="Local" StoreID="StRelationshipType">
                                    <SelectedItem Index="0" />
                                </sds:ComboBox>
                            </Editor>
    </ext:TemplateColumn>
    The edit form shows up on a button click.

    Case 1 (working fine)
    1. Open the add form.
    2. Select a value from the combobox, fill in other fields and do save.
    3. Edit form closes. New record is added to the list below.
    4. Open the add form to add new record. Combobox shows all the values as expected.

    Case 2 (issue)
    1. Open the add form.
    2. Type first 2-3 letters and select a value from the combobox, fill in other fields and do save.
    3. Edit form closes. New record is added to the list below.
    4. Open the add form to add new record. [B]Combobox shows the records filtered by the letters typed in the first instance.


    I tried below code on button click (to open add form) to clear the filters but that doesn't seems to work.
    #{ddlRelationshipType}.store.clearFilter();
    #{ddlRelationshipType}.store.filters.clear();
    Last edited by Daniil; Aug 12, 2014 at 7:31 AM. Reason: Please use [CODE] tags for all the code, [CLOSED]
  2. #2
    Hi @Maitreya,

    Please read #3 here:
    http://forums.ext.net/showthread.php?10205

    Also please read this:
    Forum Guidelines For Posting New Topics
  3. #3
    Please try
    delete comboBox.lastQuery;
  4. #4
    Hi Daniil

    Can you please help me with syntax to call the delete comboBox.lastQuery; from Javascript
  5. #5
    Well, I posted exactly the syntax.

    Please just try to put
    delete comboBox.lastQuery;
    where you tried to clear filtering. Sure, with a correct reference to a ComboBox.
  6. #6

    Issue resolved

    The issue was resolved by calling the store.load method after clearing filter.

    #{ddlRelationshipType}.store.clearFilter();
    #{ddlRelationshipType}.store.load();
    Last edited by Daniil; Aug 12, 2014 at 7:30 AM. Reason: Please use [CODE] tags
  7. #7
    This is an alternative approach.
    comboBox.reset();
    delete comboBox.lastQuery;

Similar Threads

  1. Replies: 1
    Last Post: Jan 20, 2014, 5:27 AM
  2. [CLOSED] How combobox automatically loads new value added in the form?
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 19, 2012, 7:46 PM
  3. Expand combobox list automatically.
    By rahesh in forum 1.x Help
    Replies: 0
    Last Post: Nov 11, 2011, 11:12 AM
  4. [CLOSED] [1.0] ComboBox automatically clears value?
    By MP in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 27, 2010, 6:20 PM
  5. Replies: 2
    Last Post: Feb 05, 2010, 5:46 PM

Tags for this Thread

Posting Permissions