1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    2
    Vote Rating
    0
    thomas.conere.corehr is on a distinguished road

      0  

    Default Grid cell editor combo selection (inputField and displayField not the same) issue

    Grid cell editor combo selection (inputField and displayField not the same) issue


    REQUIRED INFORMATION




    Ext version tested:
    • Ext 4.1.1

    Browser versions tested against:
    • Firefox 15.01

    Developer Skill Level:
    • Beginner ( < 4 months)

    Description:
    • I have a grid with a store containing records for people, eg. {'name':'lisa','id':'01','email':'lisa@simpsons.com'}.
    • The grid has columns that display the person's name and email.
    • I have an editor for the column cell that displays the person's name. This editor is a combobox.
    • I need to map the valueField (id) of the combobox with the id field in the grid's store's record and map the displayField of the combobox with the record's name field.
    • Problem: When I edit the cell by selecting a value from the combobox the cell renders the combobox's valueField value / the underlying id of the combo item.
    • I want to update the store's record with the person's id but display the person's name in the cell.
    • I looked aorund and I saw a solution for this for EXT 3 but none yet for 4+
    • \/ Perhaps something like this can be done for Ext4+ ?? \/
    • http://appointsolutions.com/2011/05/...itorgridpanel/
    • Any ideas? This is my first post to the forum so hope I have asked this in an appropriate format! Any links or suggestions are most welcome..

    Steps to reproduce the problem:
    The result that was expected:
    • In the example I would like to be able to edit a person's name by selecting a name from the combobox (editor of cell) but I would like the id in the record to map to the valueField of the combobox and the dataIndex / display of the cell to map to the displayField of the combobox, resulting in the cell displaying the displayField of the combobox but the id field behind the cell to have the valueField value from combobox.

    The result that occurs instead:
    • The valueField of the cell's editor combobox is displayed rather than the displayField.
    • I know you can change the valueField of the combobox to the person's name but I need to update the record in the grid with the new id but display the new name for the person.

    Test Case:
    • Please see "Steps to reproduce the problem"



    HELPFUL INFORMATION


    Additional CSS used:
    • only default ext-all.css

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Vote Rating
    850
    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


    Were you meaning to post this in the bugs forum?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Aug 2012
    Posts
    2
    Vote Rating
    0
    thomas.conere.corehr is on a distinguished road

      0  

    Default


    Hi Mitchell,

    I was not sure if I was doing something wrong or if it is a bug with Ext. Since I am very new to Ext I put it into a general discussion forum so people could see if I have done something blatantly incorrect.

    Any feedback or support or even a link or two to some example that would get me closer to a solution would be appreciated.

    Best Regards,
    Thomas.

Thread Participants: 1

Tags for this Thread