Results 1 to 5 of 5

Thread: Problem while rendering the combo box into the dynamic editable grid

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    5
    Vote Rating
    0
      0  

    Default Problem while rendering the combo box into the dynamic editable grid

    Hello,
    In my dynamic editable grid, the status column is referring another table. Since it is referring another table I have populated combo box as an editor for the status column. My combo box is also getting populated with data in a value-display pair. But in my grid I am able to see only value. I want once the grid will be loaded the values should be converted to corresponding display automatically by looking into the combo box value-display pair.
    I have attached an image for better understandings. Any kind of help is much appreciated.

    Best regards,
    Biswajit
    Attached Images Attached Images

  2. #2
    Sencha User
    Join Date
    Apr 2012
    Posts
    5
    Vote Rating
    0
      0  

    Default

    Forgot to mention that i am using Extjs 4.1

  3. #3
    Ext JS Premium Member Ratan's Avatar
    Join Date
    May 2009
    Location
    White Plains NY
    Posts
    7
    Vote Rating
    0
      0  

    Default

    I am having the same issue with 4.1
    Ratan

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

    Default

    Don't know if this is a real bug, however you could use a renderer on that column:

    Code:
    {
    ...
       renderer : function(value) {
           // better if you can reference the combo outside of the renderer 
           // (e.g. if you create the grid within initComponent)
    
           var retVal = '';
           var cmb = Ext.ComponentManager.query(comobox[...])[0];
           if(cmb) {
                  var record = cmb.findRecord(cmb.valueField, value);
                  retVal = record.get(cmb.displayField);
           }
    
           return retVal;
      }
    
    }

  5. #5
    Ext JS Premium Member Ratan's Avatar
    Join Date
    May 2009
    Location
    White Plains NY
    Posts
    7
    Vote Rating
    0
      0  

    Default

    Alexander, thanks for your reply. I am concerned about the the migration, if I have to migrate my existing 3 apps to 4, I will have to add renderer everywhere. This looks like a bug to me or may be there is some property that needs to be set to enfore value selection for the combo.

    I had somewhat same kind of problem with FormPanel where a combo would display valuefield when corresponding value is not found in the options, I found a fix to use enforceSelection=true on combo and it worked.

    Thanks,
    Ratan
    Ratan

Posting Permissions

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