Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 30

Thread: ComboBox for Grid (combo having local store)

  1. #11
    Ext User
    Join Date
    Feb 2009
    Posts
    20
    Vote Rating
    0
      0  

    Default

    Hi, durlabh , i can do this for 'local' data, but failed to setup "remote" one.

    I have setup the key pair of "id" and "value", but it keep showing the 'id' in the grid

    do you have any examples for remote mode? Thanks.

  2. #12
    Ext User
    Join Date
    Feb 2009
    Posts
    20
    Vote Rating
    0
      0  

    Default

    Hi, team, i have resolved the remote display issue, below is the code, fyi.

    Define a ext.data.store and load data from a proxy first.
    then add the rederer below:


    renderer:function(value)
    {
    var index = listStore.find("ID",value);
    var typeName = listStore.getAt(index).get("Name");
    return typeName;
    },

  3. #13
    Ext JS Premium Member
    Join Date
    Oct 2007
    Location
    Herndon, VA
    Posts
    265
    Vote Rating
    4
      0  

    Default

    You might be interested in looking at the following thread also:

    http://extjs.com/forum/showthread.php?t=37781&page=2

  4. #14
    Ext User
    Join Date
    Feb 2009
    Posts
    3
    Vote Rating
    0
      0  

    Default


    Tnkz a lot

  5. #15
    Sencha User
    Join Date
    Nov 2008
    Posts
    159
    Vote Rating
    0
      0  

    Default

    I have problem with durlabh code - mode:remote, and if i do search in combo and later do

    Code:
    grid.getView().refresh();
    all values previously asigned with displayField:'label' changed to valueField :'id'. That's because in store after query is only searched label & id - and than i do "refresh" store have no items (label) for assign.

    Any solution for this?

  6. #16
    Sencha User
    Join Date
    Nov 2008
    Posts
    159
    Vote Rating
    0
      0  

    Default

    anybody?

  7. #17
    Ext JS Premium Member
    Join Date
    Jun 2007
    Posts
    44
    Vote Rating
    0
      0  

    Default

    if anyone need this comborenderer for extjs 3

    change..

    Code:
    var field = combo.editor.field;
    to

    Code:
    if(combo.editor) var field = combo.editor.field;
    else var field = combo;

  8. #18
    Sencha User
    Join Date
    Jul 2008
    Posts
    25
    Vote Rating
    0
      0  

    Default Odd behavior

    I've been using a variation of this renderer for a while. Is it correct to assume that we still need to us this in Ext JS version 3?

    And has anyone else noticed some odd behavior if you type in a value in the combo rather than select a value with the mouse? If you start typing something, it'll show matches and look like it's going to autofill, but if you hit Tab it'll just blank out the field and not save your new value. The standard examples of the combo in the grid field don't behave this way, so I assume it's something to do with the custom renderer but I haven't been able to solve it. It makes it impossible to enter data exclusively with the keyboard... you have to use the mouse to pick things from the combo.

  9. #19
    Ext User
    Join Date
    Jun 2010
    Posts
    23
    Vote Rating
    0
      0  

    Default

    Do you have a example for remote mode?

  10. #20
    Ext JS Premium Member
    Join Date
    Oct 2007
    Location
    Herndon, VA
    Posts
    265
    Vote Rating
    4
      0  

    Default

    As mentioned in earlier post, check this out: http://www.sencha.com/forum/showthre...131#post188131

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

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