Set a Text value into AutoComplete Combo box problem when upgrade from v2.5 to 4.0.0

  1. #1

    Set a Text value into AutoComplete Combo box problem when upgrade from v2.5 to 4.0.0

    Hello everyone,
    I make an auto-complete comboBox and bind data into its store via .ashx ajax proxy.
    now the combobox works fine but when I set a text value into it , this will return an empty text.

    this code was worked in ext.net v2.5,but after upgrade to 4.0.0 the empty text happened.

    to return data via ashx..

      <ext:ComboBox ID="CobMemberSearch"  runat="server"
                    DisplayField="Name"
                    ValueField="BarCode"
                    TypeAhead="false"
                    HideTrigger="true"
                    MinChars="0"
                    TriggerAction="Query"  Width="350" LabelWidth="100" FieldLabel="Member Name" Icon="UserMagnify"  >
                            <ListConfig  LoadingText="searching ...">
                            </ListConfig>              
                                        <Store>   
                                            <ext:Store ID="Store3" runat="server" AutoLoad="false">
                                                <Proxy>
                                                    <ext:AjaxProxy Url="~/Search/Search.ashx">
                                                        <ActionMethods Read="POST" />
                                                        <Reader>
                                                            <ext:JsonReader  RootProperty="root"   />
                                                        </Reader>
                                                    </ext:AjaxProxy>
                                                </Proxy>
                                                <Parameters>
                                                    <ext:StoreParameter Name="ID" Value="#{txtId}.getValue()" Mode="Raw" />
                                                </Parameters>
                                                <Model>
                                                    <ext:Model ID="Model26" runat="server" IDProperty="BarCode">
                                                        <Fields>
                                                            <ext:ModelField Name="memBarCode" Mapping="BarCode" />
                                                            <ext:ModelField Name="memName" Mapping="Name" />
                                                        </Fields>
                                                    </ext:Model>
                                                </Model>
                                            </ext:Store>
                                        </Store>
                                        
                                        <DirectEvents>
                                            <Select OnEvent="SearchMember" />
                                        </DirectEvents>
                                       
                                    </ext:ComboBox>
    the above code works fine and return data

    now i want to set a text into comboBox manually, i tried these two lines, it keeps returning an empty combo

      CobMemberSearch.Select("Derp");
         CobMemberSearch.Text = "Herp";
  2. #2
    Hello @odaysaed! Welcome to Ext.NET forums!

    I get it that you are trying to programatically select an entry in the combo box from code behind, right?

    Just in case, if you are trying to select the combobox from a JavaScript code, the code you would be using would be:
    App.CobMemberSearch.select('Derp');
    Now, from code behind, it depends on how are you triggering the event that tries to select the combo box. Can you provide a full sample reproducing the scenario where you need to select the combo box? Are you sure the scenario depends on a combo box that is filled thru an ASHX page (maybe just a simple combo box with static data is enough to demonstrate the issue you are having, and letting you make a simpler example focusing on the actual issue!)..

    Please take your time to review our guidelines on posting questions and coming up with simple, runnable examples:
    - Forum Guidelines For Posting New Topics
    - More information required

    Actually, this can prove very useful as sometimes when trying to put together a simples example we end up either clarifying what the real problem is or finding the fix to the problem itself!

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Hi, Thank you for your reply.
    I will try to describe my case
    first: I used comboBox as autoComplete box so there is no dropdownlist and that works fine
    notice that it has a propriety
    HideTrigger="true"
    then: I want to insert or bind a text to this comboBox,any text value its not required to be a data from .asxh (this is not working)
    comboBox.text = "foo";
    comboBox.value = "moo";
    ComboBox.select("hoo");
    notice that was working in ext.net v2.5

Similar Threads

  1. Replies: 1
    Last Post: Dec 30, 2015, 4:21 PM
  2. [CLOSED] Autocomplete text control
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: May 12, 2011, 2:40 PM
  3. Combo Box TEXT Problem
    By EMS in forum 1.x Help
    Replies: 1
    Last Post: Dec 07, 2010, 2:36 PM
  4. [CLOSED] Problem with autocomplete
    By xeo4.it in forum 1.x Legacy Premium Help
    Replies: 18
    Last Post: Nov 08, 2010, 4:41 PM
  5. Replies: 1
    Last Post: May 19, 2009, 7:30 AM

Tags for this Thread

Posting Permissions