I am using several table component in our project to list and select different items.
I would like to select a row (by script) on the table … I tried to set the var: Selection.selectedRow = xyz but the item is not highlighting nor fire ‘onSelection’ change event.
Hi Tim. I think your answer is not working.
first of all, thanks for your quick reply.
I’ve put your script ‘onStartup’ action on the view which has the table in it because I cannot figure out where to put your script a root within this view.
then, what is the prop ‘event’ and from where it comes from (context) ?.
lastly, I tried this (onStartup of the view): self.getRootContainer().getChild(‘Table’).selectedRow = 1
got an error because selectedRow prop. doesn’t exists at all…
Sorry if I misunderstood something… I am a bit stuck
Hi, to have something selected in a table, you have to set the props “selectedRow” AND “selectedColumn” of the table to something or else both will be set to NULL.
Hi Tim, Yes the solution was for perspective.
The Alexis’s answer is working well. Indeed we have to set also a column to make the selection working.
Thanks for your reply.