You found a bug! We've classified it as EXTJS-8605 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    295
    Vote Rating
    7
    jheid will become famous soon enough

      0  

    Default [4.2.0.265] Bug or Feature with RowEditing(?) and multiple, same dataIndex usage

    [4.2.0.265] Bug or Feature with RowEditing(?) and multiple, same dataIndex usage


    Hi.

    I have had the problem that no value is set in a rowediting grid combox editor.
    When editing, the combobox didn't get any value although the value was there in the record.

    The problem (bug or feature) was that I used two columns with the same dataindex - one for a small icon, the other for editing:

    PHP Code:
    columns: [
     { 
    text''dataIndex'type'renderer: function (v) { ... } },
     { 
    text'Type'field: { xtype'combo', ... } }
     ] 
    I thought this should do but with this approach there's a bug/feature in Ext.form.Basic.js in the method findField

    PHP Code:
    findField: function(id) {
            return 
    this.getFields().findBy(function(f) {
                return 
    f.id === id || f.getName() === id;
            }); 
    because there's not only the combobox, but also a Ext.form.field.DisplayView with the same name (for the renderer).

    To fix this the findField has to be able to return multiple fields or it's not intended to use several columns with the same dataIndex which IMHO would be sad.

    Cheers,
    Jörn

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,408
    Vote Rating
    851
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    It's entirely possible that you may have the same dataIndex in multiple columns so I have opened a bug in our bug tracker.

Thread Participants: 1