Facing issue in Auto Suggestion --> Ext.ComboBox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RamananKalirajan
    Contributor
    • Mar 2008
    • 608

    #1

    Facing issue in Auto Suggestion --> Ext.ComboBox

    Hi All,

    I tried auto ssuggestion/completion in Ext using combobox. But its not coming/working for me. I am using IE6 and Mozilla 3.2. Both have the same effects. The first Option is alone selected. Even if i have lot of values starting by same character.

    HTML Code:

    Code:
    <div id="pmnHolder" />
    Ext JS Code:

    Code:
    Ext.onReady(function(){
    
    	Ext.namespace('Ext.pmndata');
    
    	Ext.pmndata.pmn=[
            ['sample1', 'sample1'],
            ['sample2', 'sample2'],
            ['sample3', 'sample3']];
    
    
    	var store1 = new Ext.data.SimpleStore({
        fields: ['pmn'],
        data : Ext.pmndata.pmn
    });
    
    combo1 = new Ext.form.ComboBox({
        store: store1,
        displayField:'pmn',
    	id: 'pmnField',
        mode: 'local',
        emptyText:'Select a pmn...',
    	width:128,
        selectOnFocus:true,
    	typeAhead: true,
        triggerAction: 'all',
        minChars : 1,
        renderTo: pmnHolder
    });
    
    });
    Any suggestions would be helpful. Thanks in Advance.


    Thanks and Regards
    Ramanan Kalirajan
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    See this example.

    Comment

    • RamananKalirajan
      Contributor
      • Mar 2008
      • 608

      #3
      Hi Acoder,
      I have developed the code by referring this only. But I face an issue when the real data is loaded from the backend. Until it is working good. But after the db data is loaded. It's not working as expected.

      Thanks and Regards
      Ramanan Kalirajan

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5390

        #4
        basicly it should work ... but i suspect an issue with using, or better not using a distinct value field compared to the display field ... so could you try that?

        Comment

        • RamananKalirajan
          Contributor
          • Mar 2008
          • 608

          #5
          Got the problem yaar... Fixed it. The actual problem was a space is appended with the data from DB. I removed the space now it is working perfect. Thanks for your time and suggestion. Thanks a lot.

          Thanks and Regards
          Ramanan Kalirajan

          Comment

          Working...