I want to replace the standard add row button to get more control on the button. Also I want to use today's date as default date in first column.
1.) When I use insertrow, the currentrow/first field doesn't get focus as when using Add row. How can I achieve this?
2.) When I use a script to have the first field (datetime field) filled with today's date (new Date()) I get a formexception error 'Unable to set value for field xxxx, object type org.mozilla.javascript.NativeDate is not compatible with field type DATE'. I hope somebody can help me with this.
insertrow - set focus - default date
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 86
- Joined: Thu Mar 08, 2018 2:52 pm
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
Re: insertrow - set focus - default date
When I use insertrow, the currentrow/first field doesn't get focus as when using Add row. How can I achieve this?
Code: Select all
tables.tabname.colname.columnControl.requestFocus();
or just..
controls.columncontrolname.requestFocus();
Works fine for me with both date and datetime types..When I use a script to have the first field (datetime field) filled with today's date (new Date()) I get a formexception
Code: Select all
tables.tabname.insertRow();
tables.tabname.colname.value = new Date();
0 x
-
- Ebase User
- Posts: 86
- Joined: Thu Mar 08, 2018 2:52 pm
Who is online
Users browsing this forum: No registered users and 111 guests