Hybrid View

  1. #1
    Ext User
    Join Date
    Jul 2010
    Posts
    19
    Vote Rating
    0
    egotec is on a distinguished road

      0  

    Exclamation OnChange / AfterEdit event for EditorGrid with checkbox column

    OnChange / AfterEdit event for EditorGrid with checkbox column


    Hello.

    I have a EditorGrid with a Checkbox column:
    Code:
    CellEditor checkBoxEditor = new CellEditor(new CheckBox());
    [...]
    gridEmployees = new EditorGrid<ModelData>(new ListStore<ModelData>(), new ColumnModel(configs_3));
    Now, I'd like to be notified when a row was edited.
    Code:
    gridEmployees.addListener(Events.AfterEdit, changeListener);
    But the event isn't coming when I check the checkbox. When I use a SimpleComboBox instead of the CheckBox, the event is coming when I change the selection. But I need the checkbox...

    Thanks for your help,
    Jonas.

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Please post more code about "configs_3"

  3. #3
    Ext User
    Join Date
    Jul 2010
    Posts
    19
    Vote Rating
    0
    egotec is on a distinguished road

      0  

    Default


    Code:
    List<ColumnConfig> configs_3 = new ArrayList<ColumnConfig>();
    
    		ColumnConfig lastName = new ColumnConfig("lastName", CONSTANTS.nlsLastName(), 120);
    		configs_3.add(lastName);
    
    		ColumnConfig givenName = new ColumnConfig("givenName", CONSTANTS.nlsFirstName(), 120);
    		configs_3.add(givenName);
    
    		CheckColumnConfig checkSupervisor = new CheckColumnConfig("isSupervisor", CONSTANTS.nlsDepartmentManager(), 100);
    		CellEditor checkBoxEditor = new CellEditor(new CheckBox());
    		checkSupervisor.setEditor(checkBoxEditor);
    		configs_3.add(checkSupervisor);
    
    		gridEmployees = new EditorGrid<ModelData>(new ListStore<ModelData>(), new ColumnModel(configs_3));
    		gridEmployees.setAutoWidth(true);
    		gridEmployees.setAutoHeight(true);
    		gridEmployees.setBorders(true);
    		gridEmployees.addPlugin(checkSupervisor);

  4. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    When using a CheckColumnConfig you are not using any functionality of the editorgrid. Also you dont need to to set any celleditor than. Change it to a normal ColumnConfig and it will work.

  5. #5
    Ext User
    Join Date
    Jul 2010
    Posts
    19
    Vote Rating
    0
    egotec is on a distinguished road

      0  

    Default


    Ok thanks,
    but then the grid looks ugly because in the cell is the text "true" or "false" and the checkbox will only appear when I click on a cell.

  6. #6
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    So add a CellClick listener to the grid. and check for the columnindex. You can use a normal grid in this case together with the checkcolumnconfig.

Similar Threads

  1. EditorGrid, changing column afterEdit
    By olriche38 in forum Ext 3.x: Help & Discussion
    Replies: 7
    Last Post: 25 Feb 2010, 3:47 AM
  2. Event AFTEREDIT is not triggered when CheckBox is checked
    By msuresh in forum Ext 2.x: Help & Discussion
    Replies: 25
    Last Post: 26 Jul 2009, 1:28 AM
  3. why 'afteredit' event can't fire in my editorgrid
    By qqeerr20012001 in forum Ext 1.x: Help & Discussion
    Replies: 8
    Last Post: 23 Jul 2007, 1:51 AM
  4. afteredit event in an editorgrid sent twice!!
    By lucas in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 9 Mar 2007, 12:59 AM

Thread Participants: 1

Tags for this Thread

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