1. #1
    Ext JS Premium Member joelennon's Avatar
    Join Date
    Mar 2010
    Location
    Cork, Ireland
    Posts
    17
    Vote Rating
    1
    joelennon is on a distinguished road

      0  

    Question Answered: cancelEdit method on Grid Editing plug-in

    Answered: cancelEdit method on Grid Editing plug-in


    Hi,

    I'm trying to use the Grid Editing plug-in in ExtJS 4.2, but I'm having a problem using the cancelEdit method. I have a similar configuration to the Writer example at http://docs.sencha.com/ext-js/4-2/ex...er/writer.html, and the issue also appears to be occurring in that example.

    The listener for the click event of the "Add" button calls the cancelEdit method of the editor plugin. This should cancel any changes made in the currently active cell. However, calling this method doesn't appear to do anything. Instead, it completes the edit to the cell just as it would if the cancelEdit method was not called at all.

    I have tried adding a listener for the "canceledit" event, and this does not fire when the cancelEdit method is called manually.

    To see how it should behave, try making a change in the cell and tap the Esc key on your keyboard. The change you made will be reverted. This appears to call the cancelEdit method, and the canceledit event is fired as you would expect.

    Any ideas?

    Thanks,
    Joe
    Joe Lennon
    Head of Technology, Core International
    Company | Blog | Twitter | Facebook | LinkedIn

  2. When you blur the editor field by clicking the Add button it commits the edit. So, in this instance the editing isn't cancelled as it's already been completed by the time the Add button's click has been processed.

  3. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,913
    Answers
    371
    Vote Rating
    179
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    When you blur the editor field by clicking the Add button it commits the edit. So, in this instance the editing isn't cancelled as it's already been completed by the time the Add button's click has been processed.

  4. #3
    Ext JS Premium Member joelennon's Avatar
    Join Date
    Mar 2010
    Location
    Cork, Ireland
    Posts
    17
    Vote Rating
    1
    joelennon is on a distinguished road

      0  

    Default


    Thanks for that, makes sense.

    Any suggestions on alternative approaches to this? Maybe disabling the Add button when cell editing is active?
    Joe Lennon
    Head of Technology, Core International
    Company | Blog | Twitter | Facebook | LinkedIn

  5. #4
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,913
    Answers
    371
    Vote Rating
    179
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    That might work. You can certainly have your button state managed using keying off of the beforeedit and edit (or validedit) events.

Thread Participants: 1

Tags for this Thread

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