Encountering an issue with adjusting the height of a datatable when calling a webservice to populate it.
A webpage features a collapsible div
element alongside a datatable
. Upon collapsing the div, the table's height is calculated and resized using inline CSS. However, each time the webservice is called to load data, the datatable reverts back to its original size from the expanded state.
In search of a solution for dynamically adjusting the datatable's height without being able to provide extensive code details due to client restrictions.
The method used to set the height:
tableHght.css({ 'height': yLength + 'px', 'overflow': 'auto', 'width': '100%' });`