weird grid data display behaviour

Sometime, the grid display data will goes into very weird way: it separate the header and data block with blank, leave width un-adjusted and un-hidden as desired. But, with adjusting the header column’s width with mouse mannually, the data block adhere to the header and all column width been adjusted as desired.



And, I do place the call to setSize() in the body of afterCall() specified in loadXML(URL, afterCall).

And, this is not predictable, but, it do will happen!



A snap shot image also been placed in below URL for reference:



picasaweb.google.co.uk/whysomany … 3474354082



Anybody can share some ideas?

Such problem can occur only if you loaded data in grid while it in
invisible state, or in case of loading complex TABLE layout and
initializing grid in moment when table not fully rendered yet - in both
cases grid can’t detect initial sizes and render correctly.
You can
a) call grid.setSizes() after switching to visible state
b) init grid after TABLE structure fully rendered ( place JS code after
closing TABLE tag ) or init grid from onLoad event of page.