1. #1
    Ext User
    Join Date
    Sep 2007
    Posts
    12
    Vote Rating
    0
    dee_rocks is on a distinguished road

      0  

    Default How can I cancel an event?

    How can I cancel an event?


    Hi,

    I an using the "rowdeselect" for saving the row data when the user tabs off to a new row in the GRID. I want to add some validation to check if the certain fields are populated before the row is sent to the database.

    Let's say if a user clicks the ADD btn and tabs off the record in which case the rowRecord.dirty will be false ( where var rowRecord = sm.getSelected()

    I want to show an alert statement and force the user to go back to the row where they left the mandatory fields empty.

    How can I ;

    1) reject the rowdeselect event that was fired?
    2) Is there a better way of doing this?

    Thx.

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,835
    Vote Rating
    609
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Usually, the convention is you either:

    a) Return false in the handler
    Code:
    Ext.get('a').on('click', function(e)
    {
       return false;
    }
    );
    b) Set e.cancel to true
    Code:
    Ext.get('a').on('click', function(e)
    {
       e.cancel = true;
    }
    );

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi