1. #1
    Sencha User bozzoz's Avatar
    Join Date
    Apr 2010
    Location
    Tortoreto Lido (TE) Italy
    Posts
    58
    Vote Rating
    0
    bozzoz is on a distinguished road

      0  

    Default Editor Grig listners

    Editor Grig listners


    Hello I have added the listners to my editor grid in this way:

    Code:
    winElencoGdl = Ext.extend(winElencoGdlUi, {
    	initComponent: function() {
    		winElencoGdl.superclass.initComponent.call(this);
    		
    		var griglia = this.arMemberGrid;
    		
    		//carico i dati dallo store
    		griglia.store.load();
    		
    		//aggiungo un listner per l'editing on line
    		griglia.addListener({
    			afteredit: function(e){
    				var conn = new Ext.data.Connection();
    				conn.request({
    					url: 'ajax/updateElencoGdl.php',
    					params: {
    						action: 'update',
    						id: e.record.id,
    						campo: e.field,
    						valore: e.value
    					},
    					success: function(response, opt){
    						if (response.responseText == 'success')
    						{
    							griglia.store.load();
    						}
    						else
    						{
    							console.log(response.responseText);
    						}
    					},
    					failure: function(resp, opt){
    						
    						console.log(response.responseText);
    						
    					}
    				});
    			}
    		});
    	}
    });
    Is that right?

    There is a better way?

    Thanks

  2. #2
    Sencha - Desktop Packager Dev Team jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747
    Vote Rating
    7
    jarrednicholls will become famous soon enough jarrednicholls will become famous soon enough

      0  

    Default


    That's exactly right, looks good to me! Only thing I'll throw out there is that there is a function "on" that is shorthand for "addListener" just to save a few bytes :-)

  3. #3
    Sencha User bozzoz's Avatar
    Join Date
    Apr 2010
    Location
    Tortoreto Lido (TE) Italy
    Posts
    58
    Vote Rating
    0
    bozzoz is on a distinguished road

      0  

    Default


    Thank you Jarred!

Similar Threads

  1. Handler and Listners
    By anton_ds in forum Ext GWT: Discussion
    Replies: 11
    Last Post: 18 Mar 2010, 6:11 AM
  2. Event listners not working in TreeLoader
    By nicholasnet in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 7 Jul 2008, 12:15 PM
  3. Dataview listners and Ext.Window
    By kalbster in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 9 May 2008, 4:44 AM
  4. New user pb - Ghost values in a grig
    By appleSeb in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 15 Apr 2008, 1:29 PM
  5. Grig paging, easy question but for me
    By pomata in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 27 Mar 2007, 7:15 PM

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