Datatables & getHeaderContent

hello,
Having two datatables controlled by a tabview/tabbar, i’m seeing unusual behaviour with the this.getHeaderContent() call. Each of the datatables has a masterCheckbox column, and I’m calling this.getHeaderContent() from the ready: function of each of the datatables to set the initial state. Oddly, while the table that is visible works as expected, the one that is not visible (due to the tabview) returns undefined so the operation fails. If the ready: function calls this.show() before calling this.getHeaderContent() then it works fine – although the UI moves around unpleasantly as it flicks back and forth.
Is this normal / expected behaviour? Should I be handling things differently?
This is 7.1 pro btw.
Thanks for any pointers
-SrvrSide

Is this normal / expected behaviour? Should I be handling things differently?

Yes, this is the expected behaviour. You will not be able to call the getHeaderContent() method in the case of a hidden datatable, as the method relies on DOM manipulations to get its result, which obviously fails since the datatable doesn’t actually get rendered.

Using the show() method to make the table appear in DOM is pretty much the only valid solution, as there is no another way around this limitation.

Thank you for the confirmation Dzmitry
-SrvrSide