View Full Version : How to disable a cell in a Grid
6 Oct 2011, 12:51 AM
I have a little question about the grid and the cells in the grid. How can I disable a single cell in the Grid?
What does disable mean for you? What are you trying to do?
6 Oct 2011, 12:58 AM
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?
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.
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?
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.
As an example you can see at the showcase for gxt.
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 :D
So you are using a checkcolumnconfig. Take a look at the onMouseDown method and do not call the logic if it matches your case.
Ok it works. Thanks a lot.
8 Oct 2011, 12:27 AM
Maybe this will be useful for you also
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.