hide table coloum from FPL or Javascript

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

juned_seskoad
Ebase User
Posts: 35
Joined: Mon Jul 14, 2014 11:55 pm

hide table coloum from FPL or Javascript

#1

Postby juned_seskoad » Tue Oct 14, 2014 4:48 am

Dear All,

I have a problem hide table coloum with javascript, before i success hide some field using javascript, can someone help me to do hide coloum using fpl or javascript

Regards

Juned
0 x

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

#2

Postby Jon » Tue Oct 14, 2014 6:27 am

If you have data in the table, the system interprets hide on a table column as meaning hide the cell on the current row. If the table is empty, it will hide the entire column. To hide an entire column when the table is not empty, you need to use the all keyword with Javascript e.g.

Code: Select all

controls.COL1.all.hide();
With FPL, you achieve the same thing with the hide column command e.g.

Code: Select all

hide column EMPLOYEES-COL1 in table EMPLOYEES;
Regards
Jon
0 x

juned_seskoad
Ebase User
Posts: 35
Joined: Mon Jul 14, 2014 11:55 pm

#3

Postby juned_seskoad » Tue Oct 14, 2014 8:05 am

Jon,

Thanks for your answer,,
one more question, it's possible adding picture on table coloum field, i mean in one coloum it will be one field and one picture and if i click that picture it will call other form,
let's say on case to field table coloum item, i will click on those picture and will call form item list and will return value to table coloum item

Hope you can help me,
Regards

Juned
0 x

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

#4

Postby Jon » Tue Oct 14, 2014 9:25 am

Juned,

Yes, this is all fairly regular stuff. To add the image to the table, drag in an Image Column Control, then set up a script on the server to handle the click on the image.

When the user clicks on one of the images in your table (there will be one for each row), the system automatically sets that table row as the current row on the server. This is a most important principle with Ebase, and sometimes a little difficult to understand. So, for example, you can just extract the value of another column on the same row, whether displayed or not, by just referring to it e.g.

Code: Select all

var id = tables.MYTABLE.ID.value;     //returns the value of the ID column on the clicked row (current row)
Then use this to pass it on to something else e.g. another form.

You can see more documentation on the table current row principle here http://dev-docs.verj.io/ufs/doc/table_basics.htm

Regards
Jon
0 x


Who is online

Users browsing this forum: No registered users and 12 guests