When you use the split bar handles to resize the layout, that's not a 'layout' event, but a ContentPanel's or a Region's resized / resize (I don't know why the one letter difference).

Since I have no horizontal split bars in my layout, I didn't notice this. Try to attach autoSizeColumns() on one of those and see how it turns out.

18 Apr 2007, 12:26 AM

galdaka

'layout' Is the correct event but not fires when I want.

Code:

view.autoSizeColumns.defer(100);

Not solved the problem for me.

Any ideas?

18 Apr 2007, 1:42 AM

tarsolya

What do you mean by not firing when you want?

The 'layout' will fire when a layout redraw happens, I guess. Since the grid columns can only loose their fitting on window or panel resize, you doesn't have too much other possibilities to resize them, but on this event, since panel's resize events doesn't monitor window changes.

18 Apr 2007, 2:45 AM

galdaka

Sorry my English is bad.

'layout' event OK. But the problem continues for me. The grid not autoSizeColumns when I want (After 'layout' event) and defer not works for me.

The principal layout with head and left menu and each content load into a tab (iframe).

Whe I expand/collapse the left menu panel my grid not autosizecolumns correctly.

Provisionally I put autosizeColumns in grid "click" event and works fine.

I a tab (iframe) that loads grid, I put this code:

Code:

window.parent.layout.addListener('layout', pp)

layout is the global variable of principal layout and pp is your function. The event fires OK, but grid not autosizeColumns correctly. Why? When collapse left menu the autosize not works correctly, but when expand left panel the size of columns has a extra width (should be a size of collapse state), posible defer problem??

19 Apr 2007, 2:38 AM

tarsolya

You tried to attach the autoSizeColumns() to the left (west?) region's proper events?