1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    219
    Vote Rating
    5
    Answers
    10
    webfriend13 is on a distinguished road

      0  

    Default Unanswered: Setting the value of Radio button without triggering Change event

    Unanswered: Setting the value of Radio button without triggering Change event


    HI All,

    I have a radio button. When I use following code, system fires change event of the radio button.

    Code:
    Ext.getCmp('no-range-radio').setValue(true);
    Is there is any way to suppress 'change' event when i set the value of the radio button using setValue?

  2. #2
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,118
    Vote Rating
    30
    Answers
    85
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      1  

    Default


    Suspend its events

    Code:
    var rf = Ext.getCmp('no-range-radio');
    rf.suspendEvents();
    rf.setValue(true);
    rf.resumeEvents();

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    219
    Vote Rating
    5
    Answers
    10
    webfriend13 is on a distinguished road

      0  

    Default


    Hi Tvanzoelen,

    Thank you for quick reply. I was hoping if there is a straight forward (in-built) way to suppress the event rather then suspending the events. If not, I will use this .

  4. #4
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,118
    Vote Rating
    30
    Answers
    85
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    You could override the setValue function or take a look at the property checkChangeEvents.

    You could set there only to listen for input events.

    http://docs.sencha.com/ext-js/4-1/#!...orm.field.Base

Thread Participants: 1

Tags for this Thread