Results 1 to 4 of 4

Thread: Is possible for Multiselect set prefix for each value?

  1. #1
    Sencha Premium Member
    Join Date
    Aug 2012
    Location
    Estonia
    Posts
    198
    Answers
    2
    Vote Rating
    1
      0  

    Default Is possible for Multiselect set prefix for each value?

    Subject. I want add prefix for final value if selected by another check/radio I have tried
    Code:
                              xtype:'multiselect',                                        listeners:{
                                                change:function (element, newValue, oldValue) {
                                                    if (Ext.getCmp('min-choose').getValue()) { 
                                                        console.log('In:' + newValue);
                                                        element.suspendEvents();
                                                        element.setValue('*/'+ newValue);
                                                        element.resumeEvents();
                                                    }
    
    
                                                    console.log('new:' + newValue + ' OldValue:' + oldValue);
                                                }
                                            }
    It doesn't work well I have a lot of calls for the 'change'

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3932
    Vote Rating
    1272
      0  

    Default

    So each row that is selected you want a prefix to them?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium Member
    Join Date
    Aug 2012
    Location
    Estonia
    Posts
    198
    Answers
    2
    Vote Rating
    1
      0  

    Default

    exactly

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3932
    Vote Rating
    1272
      0  

    Default

    If it's going to be the same in all records then you can use the convert method in the model. Or you can iterate through the values to add it. You can extend it and override the getValues method
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Posting Permissions

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