[CLOSED] ComboBox handle "No results found"

  1. #1

    [CLOSED] ComboBox handle "No results found"

    Hi,
    i have a ComboBox with remote query (like https://examples3.ext.net/#/Form/Com...Custom_Search/).

    How i can handle a "No result found"?

    I want to display a component with text "no result..." and handle a click/event...

    Is there a example to accomplish this?

    Thanks!
    Last edited by Daniil; Dec 01, 2015 at 1:35 PM. Reason: [CLOSED]
  2. #2
    Hi @maurox,

    I want to display a component with text "no result..."
    Please clarify where you'd like to show it.
  3. #3
    I've remembered about this approach:
    <ext:ComboBox ...>
        <ListConfig EmptyText="No result..." />
    </ext:ComboBox>
  4. #4
    ok, i for now i do this:
            <ext:ComboBox runat="server" ID="cmbIDContatto" FieldLabel="Cliente" DisplayField="Intestazione" ValueField="IDContatto" TypeAhead="false" MultiSelect="false" HideBaseTrigger="false" MinChars="2" TriggerAction="Query" MarginSpec="0 5 0 0" ForceSelection="true" Width="300" >
                <ListConfig LoadingText="Searching..." Flex="1" EmptyText="<li class='cmb-no-results'>Nessun risultato trovato - <a href='#' onclick='addContatto()'>Add new</a></li>">
                    <ItemTpl ID="ItemTpl1" runat="server" >
                        <Html>
                            <div class="search-item">
    <p>({IDContatto}) - <span>{Intestazione}</span></p>
    		        </div>
                        </Html>
                    </ItemTpl>
                </ListConfig>
                <Store>
                    <ext:Store ID="Store2" runat="server" AutoLoad="false">
                        <Proxy>
                            <ext:AjaxProxy Url="/handler/ListaContatti.ashx">
                                <ActionMethods Read="POST" />
                                <Reader>
                                    <ext:JsonReader RootProperty="vw_Contatti" TotalProperty="total" />
                                </Reader>
                            </ext:AjaxProxy>
                        </Proxy>
                        <Model>
                            <ext:Model ID="Model2" runat="server">
                                <Fields>
                                    <ext:ModelField Name="IDContatto" />
                                    <ext:ModelField Name="Intestazione" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                
            </ext:ComboBox>
    i don't know if there is a better solution.

    Thanks!
  5. #5
    Thank you for sharing the final solution!

    i don't know if there is a better solution.
    I don't quite see any better solution.

Similar Threads

  1. [CLOSED] How to Handle ExtraParams "Ext.encode(record.data)" with html tag
    By mis@adphk.com in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 09, 2015, 3:46 PM
  2. handle store load "response failed"
    By keeper in forum 2.x Help
    Replies: 3
    Last Post: Jan 07, 2015, 12:24 PM
  3. Replies: 6
    Last Post: May 31, 2013, 3:04 AM
  4. Replies: 4
    Last Post: Oct 18, 2012, 4:26 PM
  5. Replies: 3
    Last Post: Aug 09, 2010, 3:01 PM

Posting Permissions