tables delete 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

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

tables delete column

#1

Postby Segi » Thu Jan 09, 2014 12:24 am

I have a table that is initially displayed as "Display Only". When the user clicks on the edit button to enable editing, I call mytable.SetDisplayOnly(false) and want to also show the delete column. Is there a way to pragmatically hide or show the delete column.

I have looked through the tables object and did not find a method that allows this.
0 x

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

#2

Postby Jon » Thu Jan 09, 2014 8:45 am

Should be:

Code: Select all

mytable.setDeletable(true);
The setDeletable() method is on the TableControl object.
0 x

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

#3

Postby Segi » Thu Jan 09, 2014 4:42 pm

When I make the function call like this:

tables.MYTABLE.control.setDeleteable(true)

I get an error:

ypeError: Cannot find function setDeleteable in object com.ebasetech.ufs.runtime.runtimeControls.tableControl.TableRuntimeControl__GenImpl@9bad

This method doesn't appear in the autocomplete.
0 x

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

#4

Postby Segi » Thu Jan 09, 2014 5:04 pm

I figured it out.

You have to reference the table via controls.mytable.setDeleteAble(true);
0 x

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

#5

Postby Jon » Thu Jan 09, 2014 5:08 pm

Spelling mistake: the method name is setDeletable, not setDeleteable. If you issue it directly against the control like this, you will see it in the code assist.

Code: Select all

controls.TABLE1.setDeletable(true);
You will also see it in the API doc for TableControl.

But it's also valid to code it like you are doing, it's just that you don't see the method name in the code assist because the system treats it as a generic Control instead of a TableControl:

Code: Select all

tables.MYTABLE.control.setDeleteable(true);
0 x


Who is online

Users browsing this forum: No registered users and 11 guests