1. #1
    Ext GWT Premium Member
    Join Date
    Aug 2011
    Location
    Germany
    Posts
    30
    Vote Rating
    0
    Ceene is on a distinguished road

      0  

    Default Answered: How to disable a cell in a Grid

    Answered: How to disable a cell in a Grid


    Hey all

    I have a little question about the grid and the cells in the grid. How can I disable a single cell in the Grid?

  2. So you are using a checkcolumnconfig. Take a look at the onMouseDown method and do not call the logic if it matches your case.

  3. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    Answers
    60
    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


    What does disable mean for you? What are you trying to do?

  4. #3
    Ext GWT Premium Member
    Join Date
    Aug 2011
    Location
    Germany
    Posts
    30
    Vote Rating
    0
    Ceene is on a distinguished road

      0  

    Default


    I will disable a single cell. disable meens that the user is not able to edit this cell. I have a grid with checkboxes and in the first row i like to disable the first cell in the second row the second cell and so on. how can i do that?

  5. #4
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    Answers
    60
    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 you do not want to allow editing?

    You can listen to the BeforeEdit event of the EditorGrid and cancel the event if you do not want to allow editing.

  6. #5
    Ext GWT Premium Member
    Join Date
    Aug 2011
    Location
    Germany
    Posts
    30
    Vote Rating
    0
    Ceene is on a distinguished road

      0  

    Default


    The problem is that I have checkboxes in my Grid. I don't need an editor to edit a column. therefor i can not use the befor edit methods.

    Is there an other possiblity?

  7. #6
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    Answers
    60
    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


    What kind of checkboxes? We require more informations from you to actually help you. Best would be you would post a simple, standalone testcase implementing EntryPoint of your grid and explain exactly which behaviour you are looking for. Disabling a cell can mean anything.

  8. #7
    Ext GWT Premium Member
    Join Date
    Aug 2011
    Location
    Germany
    Posts
    30
    Vote Rating
    0
    Ceene is on a distinguished road

      0  

    Default


    As an example you can see at the showcase for gxt.
    http://extjs.com/examples/#roweditorgrid

    My Grid is like that. The only difference is that I have obly these kind of checkboxes.

    And know my question how can I disable the checkbox in the second row and in the fourth row?

    I hope I could explain it. In German is it easier

  9. #8
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    Answers
    60
    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 you are using a checkcolumnconfig. Take a look at the onMouseDown method and do not call the logic if it matches your case.

  10. #9
    Ext GWT Premium Member
    Join Date
    Aug 2011
    Location
    Germany
    Posts
    30
    Vote Rating
    0
    Ceene is on a distinguished road

      0  

    Default


    Ok it works. Thanks a lot.

  11. #10
    Sencha User
    Join Date
    Mar 2011
    Posts
    79
    Vote Rating
    0
    vtysh is on a distinguished road

      0  

    Default


    Maybe this will be useful for you also
    http://www.sencha.com/forum/showthre...l=1#post650214

Thread Participants: 2