I have a table in a window that is bound to a table in MSSQL. When there are more lines in the table than are visible in the table in the window the slider bar appears on the right side; this is good. What I am looking to do is have the last entry visible when it is updated.
I require the data to be shown in ASCending order. I know I can ORDER BY DESCending order and this will show the data at the top of the window. The data does get updated in the table, but the slider does not move down to show this new record.
A quick hack would be to programmatically set the selected row to the row that you just updated (or any other row of your choice). I just tried it, and the scroll bar moved down to the bottom. And, if you don’t want it to stay selected, you can set the selected row back to -1 and the scroll bar still stays where it is.
I am trying to do exactly what adamabelew was.
I thought that my script would accomplish that…
If I try to bind selected row to a property, what might that be?
I thought .rowCount would be the way to go so it would make the selected row the same as the max in the table.
It needs to be rowCount - 1:data = system.gui.getParentWindow(event).getComponentForPath('Root Container').dataset
system.gui.getParentWindow(event).getComponentForPath('Root Container').selectedrow = data.rowCount - 1since it starts at 0.