1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    1
    Vote Rating
    0
    skcurry is on a distinguished road

      0  

    Default Unanswered: EditorGrid with different CellEditor on different row

    Unanswered: EditorGrid with different CellEditor on different row


    Hi all,

    I finding a solution to read dynamic data, and use EditorGrid with different CellEditor on different row at same column for the data. Can I do that? Any ideas?

  2. #2
    Sencha User
    Join Date
    Nov 2009
    Posts
    51
    Answers
    1
    Vote Rating
    0
    smiletolead is on a distinguished road

      0  

    Default


    I see a way to set to different editors for different rows. Here is the example that uses combo box for the one row and normal editor for the next row for the same column.

    Code:
    grid.addListener(Events.BeforeEdit, new Listener<GridEvent<Plant>>() {
    	public void handleEvent(GridEvent<Plant> be) {
    		// be.getColIndex()
    		int rowIndex = be.getRowIndex();
    		int colIndex = be.getColIndex();
    		if (colIndex == 1) {
    			if (rowIndex % 2 == 0) {
    				grid.getColumnModel().getColumn(colIndex).setEditor(editor);
    			} else {
    				grid.getColumnModel().getColumn(colIndex).setEditor(textEditor);
    			}
    		}
    
    
    	};
    });
    Although it seems to work fine, I am not sure of it has any consequences.
    Last edited by smiletolead; 7 Mar 2012 at 11:43 PM. Reason: Corrected code formatting

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