Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Feb 20, 2008 21:44
open dhtmlx forum
Disable entire grid

Is it possible to disable the entire grid, so that it becomes "greyed out" on the screen, as per other disabled controls? The idea is that the user cannot use the grid at all under certain conditions, and this should be clear to the user (by being "greyed out").
Thanks...
Answer posted by Stanislav on Feb 21, 2008 09:56
There is no such API, but it can be pretty easy with HTML, you can

a) create DIV container
b) set it absolutly pozitioned, with big z-index and sizes the same as grid container
c) set dark bacground color and opacity:0.3
d) attach DIV to parent container of grid

In result at will look as shaded grid.
Answer posted by Lance on Feb 21, 2008 18:43

Thanks - in the end I:

1. Put the grid inside a <span>.

2. Set the disabled attribute of the span to "disabled".

3. grid.setEditable(false)

4. _tempdoClick = grid._doClick;

5. grid._doClick=function(){};

6. grid.setColSorting("na");

Works nicely now.