Categories | Question details Back To List | ||
Disable content of an Accordion's cell Dear support, Is it possible to disable the objects contained in a cell of an accordion ? Actually, I have for example 2 grids inside a cell of accordion, but I would like to make them as "read-only" or disabled in one call. Thanks vinc. Answer posted by Alex (support) on Aug 13, 2009 06:06 Hello, the default cell type in grid is ed (editable cell). You can define the necessary column as read-only (ro type): grid.setColTypes("ed,...,ro,...); the type can be set also for cell: <cell type="ro">..</cell> And more over editing can be disabled by onEditCell event handler (it should return false in this case): grid.attachEvent("onEditCell",function(stage,rowId,cellIndex){ return cellIndex != index_of_disabled_column; }) Answer posted by Sunchaser on Aug 13, 2009 06:18 Hi Alex, Thanks for your quick answer. Sorry, my explanation is surely too bad : what I mean is "how can I disable all objects in a cell of an accortion, whatever the object could be". In my example, I have 2 grids in a cell of an accortion, but It could be edit boxes or things like that and I would prefer not to "touch" to these objects but to do something at the accordion level, in order to make all content in accordion's cell disabled. Thanks. vinc. Answer posted by Alex (support) on Aug 13, 2009 07:49 The possible solution is to place the transparent div element over the accordion cell. var el = document.createElement("DIV"); dhxAccord.cells(cell_id).childNodes[1].appendChild(el); You can change display property of the element to enable/disable cell content. Answer posted by Sunchaser on Aug 13, 2009 09:36 Thanks Alex, I'll try this nice idea ... |