We have dhtmlxSuite_v25_pro_91111 professional license.
We have a dhtmlXAccordian control displayed in multimode with a lot of accordian cell items, in each cell we have dhtmlx grid with a sub_row_ajax.
On a action in the grid we display the sub_row_ajax and hide it based on a action performed on sub_row_rajax, this has been done easily by attaching events on the grid.
But, we also want to adjust the height of the accordian cell item and the grid within so that the all the content of the sub_row_ajax is completely visible.
What are the possible approaches to get the above done.
there is not a ready solution for that.
Try to following (not sure that it’ll work):
dhxAccord = new dhtmlXAccordion("accordObj");
var grid = dhxAccord.cells("a1").attachGrid();
- enable auto height mode:
- then set onSubAjaxLoad event handler that will change the heights of the accordion container and the cell with the grid:
var gridHeight = grid.entBox.offsetHeight;
document.getElementById(“accordObj”).style.height = grid.entBox.offsetHeight+300+“px”;
I’ve used 300 in the example. Instead of this value you should use another value (the total height of the other cells in the accordion) .
Thanks for the reply, I am in process of trying this out, justa quick question, how does one determine the total height of all the accordion, as I couldn’t find any method to find height of individual accordian cells.
by default the height of an item in multi mode is 90px. But you may change it by setHeight method:
We tried this option but this worked only when we don’t use multiple feature.
After we started using enableMultiline the height returned by grid.entbox.offsetHeight was less than actual. Because of which accord height cell was getting set to some less value and some of the rows were not visible.
How should we get height of grid in multiline mode ?
Could provide the demo to reproduce the problem locally ? Please don’t include libraries in the demo (as they are from PRO edition)