Changing editable in a table

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

Kirsty
Ebase User
Posts: 2
Joined: Fri Feb 03, 2012 4:39 pm

Changing editable in a table

#1

Postby Kirsty » Mon Feb 06, 2012 9:21 am

Hi there,

I have a table which shows details about a person - name, id number, start time, end time etc etc. Some of these fields I want read only - name and id number. Have managed to do this bit fine. However, when a new row is added I would like to make those fields editable only on that row.

Is this possible? I have tried changing the displayOnly property but it doesn't seem to be recognised.

Thanks,

Kirsty
0 x

AJDulk
Ebase User
Posts: 94
Joined: Fri Sep 14, 2007 12:18 pm
Location: The Netherlands
Contact:

Re: Changing editable in a table

#2

Postby AJDulk » Mon Feb 13, 2012 10:10 am

I hardly ever use the "Add row" functionality of Ebase - instead I create a button and put my own script behind that button. Then I use something like:

Code: Select all

insertRow ExampleTable;
unset ExampleTable-ID displayOnly;
unset ExampleTable-NAME displayOnly;
The unsets should also work in the Add Row event of the table.

One thing I have seen beginning programmers do is loop through the table to try and find the row that has been added - this makes for some highly interesting and convoluted code - this is totally unnecessary since the added row is automatically the current row.
0 x

Kirsty
Ebase User
Posts: 2
Joined: Fri Feb 03, 2012 4:39 pm

#3

Postby Kirsty » Tue Feb 14, 2012 11:29 am

Thanks AJDulk :)

Worked nicely. I wasn't looping through rows hunting for new ones. My get around until I could solve this one was just to have a new table with the editable fields.

The

Code: Select all

unset table-column displayOnly;
Worked nicely on the add row script.
0 x

fronsky
Ebase User
Posts: 86
Joined: Thu Mar 08, 2018 2:52 pm

Re: Changing editable in a table

#4

Postby fronsky » Thu Aug 09, 2018 10:27 am

Update (based on javascript):

controls.ColumnName.setDisplayOnly(false);
0 x


Who is online

Users browsing this forum: Google [Bot] and 7 guests