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

      0  

    Default Answered: How to control whether the grid is editable or not in ExtJS 4.1.1 ?

    Answered: How to control whether the grid is editable or not in ExtJS 4.1.1 ?


    I need to switch the editable status of grid. For example,if I click the 'edit' button, it makes me able to edit the data in grid .Otherwise the grid stays uneditable

    How can I make it?

    Your help is needed and appreciated

  2. I suggest that you add a beforeedit listener to your edit plugin.
    http://docs.sencha.com/ext-js/4-1/#!...ent-beforeedit

    In this listener you just check a variable in your grid to see if it is currently editable. Returning false from this listener will block editing.

  3. #2
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    41
    Vote Rating
    3
    Answers
    3
    LarssaAndin is on a distinguished road

      1  

    Default


    I suggest that you add a beforeedit listener to your edit plugin.
    http://docs.sencha.com/ext-js/4-1/#!...ent-beforeedit

    In this listener you just check a variable in your grid to see if it is currently editable. Returning false from this listener will block editing.

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

      0  

    Default


    Thank you for your advice.I solved it by editing.enable() and editing.disable(),
    and I have to modify the source code cellediting.js to make the variable 'disabled' work(I'm surprised that the source code did not use the 'disabled' at all);

Thread Participants: 1

Tags for this Thread