show or hide a table column

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

show or hide a table column

#1

Postby xren » Mon Oct 27, 2014 6:45 pm

Hi,

I have a table, I would like dynamically show or hide a couple of columns based on the searching result.

How can this be done?

Thanks,
Xiaoli
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Tue Oct 28, 2014 7:11 am

If the table contains data i.e. it's not empty, then to hide an entire column:

Code: Select all

controls.FIELDCOLUMN1.all.hide();
To hide a single table cell (show spaces in the table cell):

Code: Select all

controls.FIELDCOLUMN1.hide();
If the table is empty, you can hide an entire column with:

Code: Select all

controls.FIELDCOLUMN1.hide();
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#3

Postby xren » Wed Oct 29, 2014 12:36 pm

Thank you Jon. It works fine.

Another question: can I dynamically add a column to a table?

Thanks,
Xiaoli
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#4

Postby Jon » Wed Oct 29, 2014 1:10 pm

No, you can't add something. All you can do is create it in the designer as hidden and then dynamically show it.
0 x


Who is online

Users browsing this forum: No registered users and 22 guests