1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    38
    Answers
    1
    Vote Rating
    3
    panbayi is on a distinguished road

      0  

    Default Unanswered: triggerfield in grid

    Unanswered: triggerfield in grid


    Hi there!

    I hava a grid and one of its column's editor is triggerfield.

    Following is what I want to achieve.

    When I click the triggerbutton, a window contains a grid is created and I doubleclick one row of the grid ,the value is put into the cell in which is the triggerfield.

    But my problem is when I double click the grid in the window,the cell whose editor is triggerfield don't has the value I wish it had.


    here is the eidtor
    Code:
    editor : {
       xtype : 'triggerfield',
       triggerCls : 'x-form-search-trigger',
       onTriggerClick : function(event){
          this.fireEvent('ontriggerclick',this,event);
       }
    }
    in the controller i detect the 'ontriggerclick' event
    Code:
    'triggerfield' : {
       'ontriggerclick' : this.triggerClick
    }
    now is the triggerClick function response to the event
    Code:
    triggerClick : function(field){
    		var me=this;
    		var openwindow=Ext.create('Ext.ux.OpenWindow',{});
    		var windowname;
    		var arg1;
    		var arg2;
    		var arg3;
    		var arg4;
    		var arg5;
    		var arg6;
    		var arg7;
    		var arg8;
    		var arg9;
    		if(me.flag=='query'){
    			windowname='q_gem';
    			arg1='';
    			arg2='';
    			arg3='';
    			arg4='';
    			arg5='';
    			arg6='';
    			arg7='';
    			arg8='';
    			arg9='';
    			openwindow.openWindow(field,'SYSTEM',windowname,'c',arg1,a  rg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    		}
    		else{
    			windowname='q_gem';
    			arg1='';
    			arg2='';
    			arg3='';
    			arg4='';
    			arg5='';
    			arg6='';
    			arg7='';
    			arg8='';
    			arg9='';
    			openwindow.openWindow(field,'SYSTEM',windowname,'i',arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);//field is a object(triggerfield),and the other params has nothing to do with my problem
    		}
    }
    openWindow is a class I defined ,which creates a window and a grid contains data in it.When I double click the grid the data whill be set in the triggerfield.

    Any help would be appreciated.
    Thank you so much for viewing my post!

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,735
    Answers
    3364
    Vote Rating
    756
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I would make an extension for this and simple use that xtype
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar