Selection high light of first row in the SQL table

I would like to highlight the first row of a SQL record in the table while the page is opened first time. Basically, default row selection would be the first record. This is for Perspective. I used screen startup event and wrote zero value to selectedRow which doesb't work, Can anyone help me with this?

Setting the selectedRow to 0 should work; especially if the event is being fired directly from the table. I notice that there is a star next to the onStartup indicating the the script has not been applied. This is likely the issue.

I tried both the method. both are not working. That * symbol comes a few seconds later I open the "configure event" popup

Hmmm. Is enableRowSelection True?

It might be easier to use an expression binding of 0 on selectedRow.

How would you write that, so it doesn't keep the selection at zero and make other rows essentially not selectable?

Bindings run when the view opens and when something in the binding changes. Since nothing in the binding is changing, it only runs when the view opens.


yes, enableRowSelection is True

1 Like

the concept is simple that selectedRow should be written zero. But I tried in different methods, it doesn't seem to be working

I tried this method, it is not working. even, I tried to make a condition that if selectedRow == 'None':
selectedRow =0.
Even this one is not working

I tested mcgheeiv's method, and it worked. The binding shouldn't read selectedRow =0. It should simply read 0

I'm not sure what the problem could be. What browser are you using? What is the operating system?

I have noted that my right table linked with left table is selected the first row. Which is fine, only one thing is not working. the selected first row in the left side table is not highlighted with blue color indication (we have this blue color indication on the selection, I guess that the default color too).

That's the only thing is to be resolved.

Operating system is Windows 10. and the browser is google Chrome