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

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