1. #1
    Ext GWT Premium Member
    Join Date
    Aug 2011
    Location
    Germany
    Posts
    30
    Vote Rating
    0
    Ceene is on a distinguished road

      0  

    Exclamation Answered: Grid with ComboBox......i don't get it

    Answered: Grid with ComboBox......i don't get it


    Hallo

    I searched the whole day in the internet and in this forum but I don't get it. I hope somebody can help me.

    I have a Project with a Grid and 3 Cells (name,alter,jaNein). The first and the second cell is a TextField but the third cell is a ComboBox. Till here is everthing all right. I put a List in my ComboBox
    PHP Code:
     private List<ComboEintraggetComboEintrag() {
       List<
    ComboEintragplants = new ArrayList<ComboEintrag>();
       
    plants.add(new ComboEintrag("J""Ja"));
       
    plants.add(new ComboEintrag("N""Nein"));
       return 
    plants;

    PHP Code:
     ListStore<ComboEintragstates = new ListStore<ComboEintrag>();
    states.add(getComboEintrag()); 
    Then I put my data in the Grid
    PHP Code:
     private List<PlantgetData() {
       List<
    Plantplants = new ArrayList<Plant>();
       
    plants.add(new Plant("Sascha""29""J"));
       
    plants.add(new Plant("Steffi""24""N"));
       return 
    plants;

    PHP Code:
    ListStore<PlantplantList = new ListStore<Plant>();
    plantList.add(getData());
     
    grid = new Grid<Plant>(plantList, new ColumnModel(configs)); 
    And now comes my question. How is it possible that in the third cell not the "N" or "J" is written but the "selfValue" from the ComboBox?

    I hope my english was not too bad.

    @moderator: Sorry for the wrong area, please put me in the right area.

  2. Check this sample:
    http://www.sencha.com/examples/explo...l#editablegrid

    Basically, all you need to do is prepare the CellEditor for the comboBox case (preProcessValue and postProcessValue).
    In the postProcessValue, you will then show the "description" column of your ComboEintrag.

  3. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,445
    Vote Rating
    129
    Answers
    69
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Moving this to GXT forums
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  4. #3
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    870
    Vote Rating
    1
    Answers
    9
    micgala is on a distinguished road

      0  

    Default


    Check this sample:
    http://www.sencha.com/examples/explo...l#editablegrid

    Basically, all you need to do is prepare the CellEditor for the comboBox case (preProcessValue and postProcessValue).
    In the postProcessValue, you will then show the "description" column of your ComboEintrag.

Thread Participants: 2