Threaded View

  1. #1
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    2,732
    Vote Rating
    104
    mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all

      0  

    Default Ext.ux.MultiRowUpdateSelectionModel

    Ext.ux.MultiRowUpdateSelectionModel


    A client of mine wanted multi-row update for a large grid where he often updated many rows with the same values. Select by checking rows in the selection column, then any change to an editable field will propagate to the selected records.

    Live example

    Code:
    Ext.namespace('Ext.ux');
    
    Ext.ux.MultiRowUpdateSelectionModel = Ext.extend(Ext.grid.CheckboxSelectionModel, {
        initEvents : function(){
            Ext.ux.MultiRowUpdateSelectionModel.superclass.initEvents.call(this);
            this.grid.on('afteredit', function(editEvent) {
              if (this.grid.selModel.selections.getCount() > 0)
              {
                this.grid.selModel.selections.each(
    	            function(rec) {
    	              if (rec !== editEvent.record)
    	              {
    	                rec.set(editEvent.field, editEvent.value);
    	              }
    	          });
    	        }
            }, this);
        }
    });
    If using this with Ext versions < 2.2, you might want to add the code below to stop the edit click to act as a row selection.

    Code:
        // Deactivate row selection by row click
        handleMouseDown : Ext.emptyFn
    Last edited by mankz; 25 Sep 2008 at 10:28 AM. Reason: Updated for Ext 2.2

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