Control columns to edit and override value in cell

I am trying to setup a table for data entry. Two issues have arisen that I cannot figure out the solution to. First I have a table with multiple columns, but only two of the many columns need to be edited. How can I make it so that when tab is pressed it goes between the two editable columns and then down a row. Right now all 10 columns have to be tabbed through before it goes down a row.

Secondly how do I make it so when a cell is typed into it overrides the value? Right now it just starts adding digits to the current value.

One more thing is there a way to make enter act like the tab key in the table.

All three of these solutions will make data entry much faster.

i figured out 2/3 to control the enter key and which columns to move between i used this on the keypressed event of the table.

if(event.keyCode == 10):
	if(event.source.selectedColumn == 3):
		event.source.selectedColumn = 2
	elif(event.source.selectedColumn == 2):
		event.source.selectedColumn = 3
		event.source.selectedRow -= 1

i still do not know how to overwrite the value in the cell.

after further testing the solution previously posted does not work if the sort order of the table is changed. the selected cells starts to jump all over the place until i sort the table back to how it was orginally. then it starts to work correctly.

Ok, I have tweaked your code a bit, but the “jumping around” that you noticed is actually a minor bug in the table’ss setSelectedRow() logic that focuses on the newly selected row, but fails to translate for the sorting. This has been fixed for 3.3.2.

As for overwriting the cell on edit - I agree that would be better. I’ll add this as a feature request.

if(event.keyCode == 10): if(event.source.selectedColumn == 3): event.source.selectedColumn = 2 elif(event.source.selectedColumn == 2): def setLater(row = event.source.selectedRow, event=event): event.source.selectedColumn = 3 # to counteract the default enter keypress behavior event.source.selectedRow = row fpmi.system.invokeLater(setLater)

I hate being one of those people who drags up old threads, but is it now possible to set the cell of a table to overwrite for data entry?

in the change log forum thread FactoryPMI version 3.3.2 has the update to override values in editable table cells.

[quote]April 22, 2009 - FactoryPMI 3.3.2 released.

Changelog Entry

Version 3.3.2 build 2754 (Release Date 4/22/2009)

New: fpmi.tag.writeToTagSynchronous() call allows synchronous tag updates.
Improved: Table.setColumnAttributesDataset now uses automatic type-coersion.

[size=150]Improved: Table editing now overwrites/selects all when editing begins.[/size]
Improved: Accessability improved on the dynamic property customizer.
Improved: Various improvements to the IP Cam Viewer component to support Linksys and Mobotix cameras.
Improved: Low level comm detail should improve HTTP keep-alive performance.
Improved: Mouse scroll wheel support added to script editors.
Improved: Easy chart axes now have a minimum auto-range size of 1.0 to prevent strange tick units on flatline data.
Fixed: Bug that caused projects to be unable to launch in Applet mode.
Fixed: Bug that caused an error on classic charts in category mode that had zero rows of data.
Fixed: Bug that caused tabbing off the last cell of an editable table and then clicking a button caused the cell to not commit the edit.
Fixed: Bug in table.setValue() that caused it to not coerce from python datatypes well.
Fixed: Bug that caused the Designer’s custom palettels to not be re-created if they were lost.
Fixed: Chart now draws selection highlight correctly when the chart has a border.
Fixed: Easy Chart now correctly fires mouse events.
Fixed: Bug that caused the module editor’s buffer to get cleared when also running the script playground.
Fixed: Datasource can now support -1 for the Max Idle pooling parameter.
Fixed: Minor bug in the HTML formatting of the Table’s exportHTML function.
Fixed: Possible NPE when deleting a component.
Fixed: Bug that caused the internal authentication profile to not perform soft failover correctly.[/quote]