Results 1 to 5 of 5

Thread: how to make live search in cell at grid

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    4
    Vote Rating
    0
      0  

    Default Unanswered: how to make live search in cell at grid

    i want to make live search in cell at a grid, how can i do this?

  2. #2
    Sencha User friend's Avatar
    Join Date
    Apr 2011
    Posts
    895
    Answers
    106
    Vote Rating
    27
      0  

    Default

    When you say 'live search', are you're talking about auto-complete/type-ahead for specifying the value in a grid cell?

    If so, you'll need to configure the plugins attribute of your grid's configuration to use Ext.grid.plugin.CellEditing.

    You'll then need to specify an editor for the target grid column (see the code sample in the CellEditing docs) which uses an Ext.form.field.ComboBox. If you want the combo to look like a plain old input box without a dropdown arrow displayed, you can set hideTrigger: true.

    Also note that you can set the combo's minChars attribute to determine how many keys a user types before auto-complete kicks in.

    If you mean something else by 'live search' , then please explains your needs in more detail and I'll try to assist further.

  3. #3
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,388
    Answers
    716
    Vote Rating
    499
      0  

    Default

    This example may be of help as well:
    http://dev.sencha.com/deploy/ext-4.1...um-search.html

    Scott.

  4. #4
    Sencha User
    Join Date
    Jul 2012
    Posts
    4
    Vote Rating
    0
      0  

    Default

    i mean just like this picture, when i type a keyword the result is that having a relationship with the keyword. example : if i type ml the result must be ml, ml/L

    live-search.png

  5. #5
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,388
    Answers
    716
    Vote Rating
    499
      0  

    Default

    Like this:

    Code:
    // The data store containing the list of states
    var states = Ext.create('Ext.data.Store', {
        fields: ['abbr', 'name'],
        data : [
            {"abbr":"AL", "name":"Alabama"},
            {"abbr":"AK", "name":"Alaska"},
            {"abbr":"AZ", "name":"Arizona"},
            {"abbr":"TN", "name":"Tennessee"},
            {"abbr":"TX", "name":"Texas"}
        ]
    });
     
    // Create the combo box, attached to the states data store
    Ext.create('Ext.form.ComboBox', {
        fieldLabel: 'Choose State',
        store: states,
        queryMode: 'local',
        hideTrigger: true,
        displayField: 'name',
        valueField: 'abbr',
        renderTo: Ext.getBody()
    });
    Scott.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •