1

Hide grid columns

asked 2014-01-14 17:34:30 +0800

xeridia gravatar image xeridia
47 1

We are using zk 7.0.0.

It is failing to hide columns of a grid, with the "hflex" attribute,.

We are trying to hide in two different ways and both fail:

  • Through a "setVisible" column
  • Using the menupopup = "auto" from "columns"

Code causing the problem:

<zk>
  <window>
    <button label="show col2" onClick="col2.setVisible(true);"></button>
    <button label="hide col2" onClick="col2.setVisible(false);"></button>
    <grid>
        <columns menupopup="auto">
            <column id="col1" hflex="1" label="col 1" />
            <column id="col2" hflex="2" label="col 2" />
        </columns>
        <rows>
            <row>
                <cell><label value="col 1 1"/></cell>
                <cell><label value="col 1 2"/></cell>
            </row>
            <row>
                <cell><label value="col 2 1"/></cell>
                <cell><label value="col 2 2"/></cell>
            </row>
        </rows>
    </grid>
  </window>
</zk>

Link to an example of the problem: http://zkfiddle.org/sample/38viibg/3-grid-visible-column

delete flag offensive retag edit

Comments

Upvote by me. Tested the fiddle and it does work on zk 6.5.x and not on the zk 7.0.0 @xeridia nice work.

chillworld ( 2014-01-14 21:11:49 +0800 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-01-15 05:37:48 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

I will suggest reordering will help you to do this May be this will help you

zk-listbox-with-column-reordering-in-zul

link publish delete flag offensive edit
0

answered 2014-01-20 07:36:55 +0800

xeridia gravatar image xeridia
47 1

Thanks for the reply, but I did not fix the problem.

I tried the version 7.0.1.FL.20140115 and it seems the bug is fixed.

Would I could give an approximate release date of the version 7.0.1?

link publish delete flag offensive edit

Comments

Tried 7.0.1.FL.20140129. Problem still exists. The column text is now hidden, but the "column_space" is still there and messing up my grid (since no data is shown for this column). Any solution? (except "show all" until a fix is available")

IngoB ( 2014-01-30 14:59:01 +0800 )edit
Your answer
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
2 followers

RSS

Stats

Asked: 2014-01-14 17:34:30 +0800

Seen: 65 times

Last updated: Jan 20 '14

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