dhtmlxgrid flashes during div initialization

I have a hidden

with an internal dhtmlxgrid control. I initialize and populate the grid before turn the div visible.



But when I turn it visible, the grid flashes (the data start appearing like halfway down and the header are bigger and immediatly corrects it). It happens very fast but visible.



If I make the grid invisible and visible again, the grid shows normally.



Can you help me to avoid this behavior?

Which version of dhtmlxGrid do you use? (version lesser than 1-4 can cause visual distortion when loaded in hidden container)
Also please be sure that each loaded page has unique ID for grid and for grid container (because page loaded by AJAX they mixed inside same page, and if IDs not unique - conflict may occur)