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
Changing editable in a table
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 94
- Joined: Fri Sep 14, 2007 12:18 pm
- Location: The Netherlands
- Contact:
Re: Changing editable in a table
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:
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.
Code: Select all
insertRow ExampleTable;
unset ExampleTable-ID displayOnly;
unset ExampleTable-NAME displayOnly;
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
-
- Ebase User
- Posts: 2
- Joined: Fri Feb 03, 2012 4:39 pm
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
Worked nicely on the add row script.
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;
0 x
-
- Ebase User
- Posts: 86
- Joined: Thu Mar 08, 2018 2:52 pm
Re: Changing editable in a table
Update (based on javascript):
controls.ColumnName.setDisplayOnly(false);
controls.ColumnName.setDisplayOnly(false);
0 x
Who is online
Users browsing this forum: No registered users and 4 guests