PDA

View Full Version : [2.2.5] Grid column resizing behavior is erratic and not reliable



altmayer
30 Nov 2011, 12:24 AM
[2.2.3] is the correct used version

Hi there,

the default setting for grid column resizing behavior is true. So it should be possible to resize columns in the rows AND in the header without doing anything special coding (Note that I disabled header menus).

Unfortunately I had to go through all ColumnConfigs of my grid to make resizing work for the rows. However, resizing columns in the header initially does not work.
Only if I resize a column in the rows, the resize splitter shows up in the header too.

I looked through the code and saw that there are a lot checks done whether the view or the header is ready or attached. Thus, I thought I do this

getView().refresh( true );
and/or

getView().getHeader().refresh();
after the view is rendered.
I saw via debugger that by doing this the GridSplitBar of the header is finally attached via

ComponentHelper.doAttach(bar);
However, column resizing in the header is still not possible initially.

In general, the behavior of the resizing splitter is very erratic. Sometimes, it shows up, then it is not visible at all, when hovering over the appropriate place.

altmayer
30 Nov 2011, 7:17 AM
Hi,

it seems that ist was my fault (this time ;)). The z-index of the grid header was set to 1 for other reasons. So the splitter was under the header and came only to front using the splitter in the rows.

I removed now the z-index and also the initial enabling of column resizing in column configs.
Now, it is the other way round: I can initially resize columns in the header and then only later (after hovering over the splitter area in the header) the splitter was also visible in the grid. Still, very strange behavior - and also current behavior in the gxt examples on the sencha sites.

btw: setting splitter size does not seem to have any effect. As I saw in the code it is initially set and later never read again.