1. #1
    Sencha User treblereel's Avatar
    Join Date
    Mar 2010
    Location
    Moscow,Russia
    Posts
    67
    Vote Rating
    1
    treblereel is on a distinguished road

      1  

    Default how to set cell editable/noneditable in EditorTreeGrid

    how to set cell editable/noneditable in EditorTreeGrid


    Hi all. How do i can set some (random ?) cells in EditorTreeGrid to be non-editable ?

  2. #2
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    867
    Vote Rating
    1
    micgala is on a distinguished road

      1  

    Default


    Hi.

    Simply add a BeforeEdit event to the grid, and set the event cancelled to true if you want to make it non editable for the given cell.

    PHP Code:
    editorGrid.addListener(Events.BeforeEdit, new Listener<GridEvent<BaseModel>>() {
                public 
    void handleEvent(GridEvent<BaseModelbe) {
                    if (
    not editable) {
                        
    be.setCancelled(true);
                    }
                }
            }); 
    Regards,
    Michel.

  3. #3
    Sencha User treblereel's Avatar
    Join Date
    Mar 2010
    Location
    Moscow,Russia
    Posts
    67
    Vote Rating
    1
    treblereel is on a distinguished road

      0  

    Default


    thanks, its works !

Similar Threads

  1. how to find current editing cell in EditorTreeGrid
    By salmondavid888 in forum Ext GWT: Discussion
    Replies: 0
    Last Post: 18 Apr 2011, 5:36 AM
  2. Replies: 3
    Last Post: 9 Sep 2009, 1:09 PM
  3. Replies: 3
    Last Post: 27 Aug 2009, 2:06 AM
  4. How to make on particular cell in editor grid as noneditable textfield
    By Sivanesan.G in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 28 Nov 2008, 5:34 AM

Thread Participants: 1