making the columns visible based on checkbox

asked 2017-04-20 08:00:42 +0800

KartikBandri gravatar image KartikBandri
3 2

updated 2017-04-20 12:39:09 +0800

Hi All,

I want make some columns visible/invisible based on Checkbox selection by the user. It was working in ZK version 3 but after upgrading to version 8 it is not working. Please help us to resolve this issue. Below is the code in zul which is used.

By Default/onload of the page only messageColumn will be dispalyed but when user ticks on checkbox all four columns will be displayed and after if user unchecks the checkbox then again only messageColumn should be displayed

<dialog title="process" id="logDialog" width="1000"> <grid id="logGrid" sclass="logGrid" height="600px">

<columns sizable="true">

<column id="messagecolumn" label="Message" width="120px" align="center"/> <column id="datacolumn" label="Data" width="120px" align="center" visble="false"/> <column id="idcolumn" label="ID" width="120px" align="center" visble="false"/> <column id="infocolumn" label="Information" width="120px" align="center" visble="false"/> </columns>


<hbox align="center"> <checkbox lable="tick" oncheck="showAllColumns(self.checked)"/> <seperator spacing="30px" orient="vertical"/> <button label="cancel" onclick="cancel()"/> </hbox>


<zscript> void showAllColumns(checked) { datacolumn.visible=checked; idcolumn.visible=checked; infocolumn.visible=checked; } </zscript>

thanks in advance!!!

delete flag offensive retag 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

1 follower



Asked: 2017-04-20 08:00:42 +0800

Seen: 22 times

Last updated: Apr 20 '17

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