:: Forum >>

Set first row active programaticaly

I never found a clue...
But it should be realy easy...

How do I set some row (specially the first one) to be selected ?

I had to do all background operations via SQL querries (PHP) putting them into JS array. The form on the page should display details of the records in the grid. But when query is done none row is selected making a little problems with the rest of form.

I need some way to select first row right after query to update the form.

Thanx for advice..

Friday, April 8, 2005
Use the following in your script to highlight first row in grid

//highlight first row by default
obj.setProperty("selection/index", 0);
Tuesday, April 12, 2005


I'm trying to do similar, however i can't get the above code to work.

Once the table has loaded, i want the first row highlighted (as if clicked)

Using the above method, nothing happens...

Any further pointers ???


Tuesday, September 27, 2005

try using this


Tuesday, September 27, 2005
Thanks for the pointer, it works !!!


I now want to get a bit more advanced and make the index (row number variable).

Basically whilst building the table if data in myData[i][0] == a pre-determined value i want to focus (setSelectionIndex) to [i].

My program looks sound however it sets focus to [i] when matching, but subsequent lines (no match) focus the selection index back to zero.

Is there a way of only setting the focus when at the end of the table to overcome this ???

Hope this makes sense.


Tuesday, September 27, 2005

setSelectionIndex before....

i hope this will help.
i didnt get you.... sorry.....
Thursday, September 29, 2005
I dont know if anyone help me here, but I am hoping. I have been searching the forum for a hour or so and I can not come up with a good answer. I want to do the same as the above posts...set the active row programaticly. But in my case I want it to happen when a button is pressed.

I have my grid with a list of files and then a button to which I would like to force the a specific row to be selected.

I use: obj.setSelectionProperty("index", 0); to force the first row to be selected on load, but for some reason I can not use that same code in the onclick event of a button.

Has anyone done this before? Can I get some help on this one.

Friday, December 2, 2005

This topic is archived.

Back to support forum

Forum search