0

How to reset column size when they are resizable

asked 2015-11-09 11:35:02 +0800

WilliamB gravatar image WilliamB
1609 1 6

updated 2015-11-09 14:14:56 +0800

I've a grid with resizable column. Among my columns, I've 2 that are displayed on condition, it's either column A or Column B.

I'm having an issue though. If i launch a search with condition for column A to be displayed. Then resize one column, if i launch a new search which condition for column B, it never shows.

If no resize, it works fine.

So I'm not sure if the issue lies with the visible attribut on those columns, or the hflex. but to be sure I wanted to try and reset the column size to the basic settings.

I've tried invalidating the grid, but I don't see any changes at all, so maybe it's keeping in memory the size of the column?

<columns sizable="true">
    <column hflex="2" label="${labels.labla1}"/>
    <column hflex="3" label="${labels.labla2}"/>
    <column hflex="4" label="${labels.labla3}"/>
    <column hflex="2" label="${labels.labla4}"/>
    <column hflex="2" label="${labels.labla5}"/>
    <column hflex="2" label="${labels.labla6}"/>
    <column hflex="3" label="${labels.labla7}"/>
    <column hflex="5" label="${labels.labla8}"/> visible="@load(vm.mYFlag)" />
    <column hflex="2" label="${labels.labla9}"/>
    <column hflex="5" label="${labels.labla10}"/>
    <column hflex="2" label="${labels.labla11}"/>
    <column hflex="5" label="${labels.labla12}"/> visible="@load(!vm.mYFlag)" />
</columns>

I thought I found it when i stumpled on setInnerWidth in the GRid.java but it does nothing ... The width still at 100% even if it's not true ...

delete flag offensive retag edit

Comments

The fact that the colulmn doesn't re appear is a bug : http://tracker.zkoss.org/browse/ZK-2949

WilliamB ( 2015-11-10 10:03:06 +0800 )edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2015-11-09 11:35:02 +0800

Seen: 18 times

Last updated: Nov 09 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More