1. #11
    Sencha User
    Join Date
    Feb 2010
    Location
    Brescia
    Posts
    60
    Vote Rating
    0
    ladro1987 is on a distinguished road

      0  

    Default


    I have add in a new file javascript this code:
    Code:
    // Override the cancelEdit function of RowEditing plugin to insert canceledit event  Ext.override(Ext.grid.plugin.RowEditing, {      cancelEdit: function() {          var me = this;          if (me.editing) {              me.getEditor().cancelEdit();              me.callParent(arguments);                this.fireEvent('canceledit', this);          }                  me.addnew = false;      }  });
    After i have create the grid with rowediting with this code
    Code:
     // Create RowEditing plugin rowEditing2  var rowEditing2 = Ext.create('Ext.grid.plugin.RowEditing', {      id:'rowEditing2',      clicksToEdit: 2  });    // Remove record from store on canceledit from grid using rowEditing2 plugin  rowEditing2.on('canceledit', function(me) {      if(me.addnew)          me.context.record.store.remove(me.context.record);      });
    but when i cancel the record nothing happens!

  2. #12
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,084
    Vote Rating
    95
    Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light

      0  

    Default


    Try with this first:

    Code:
    // Override the cancelEdit function of RowEditing plugin to insert canceledit event
    Ext.override(Ext.grid.plugin.RowEditing, {
        cancelEdit: function() {
            var me = this;
            if (me.editing) {
                me.getEditor().cancelEdit();
                me.callParent(arguments);
                this.fireEvent('canceledit', this);
            }
        }
    });
    
    // Create RowEditing plugin rowEditing2
    var rowEditing2 = Ext.create('Ext.grid.plugin.RowEditing', {
        id:'rowEditing2',
        clicksToEdit: 2
    });
    
    // Remove record from store on canceledit from grid using rowEditing2 plugin
    rowEditing2.on('canceledit', function(me) {
      me.context.record.store.remove(me.context.record);    
    });
    Also make sure you are using the right plugin name in ur grid (rowEditing2 here) and have included the new JS file in your HTML file!

  3. #13
    Sencha User
    Join Date
    Feb 2010
    Location
    Brescia
    Posts
    60
    Vote Rating
    0
    ladro1987 is on a distinguished road

      0  

    Default


    Yes!! It work!!
    Thanks!!

    But i've used this sintax for "cancel" the record:
    Code:
        rowEditing2.on('canceledit', function(me) {
              //me.context.record.store.remove(me.context.record);    
            store.load();
        });
    because if i stay updating a record and press "cancel", this sistem didn't hide the record; while "me.context.record.store.remove(me.context.record)" hide the exists record and "cancel" the new record that was not save.

    Thank You!!!!

  4. #14
    Sencha User
    Join Date
    Mar 2011
    Posts
    208
    Vote Rating
    0
    bee is on a distinguished road

      0  

    Default


    Thanks Guys.. you saved my day..!!

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