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..
Use the following in your script to highlight first row in grid
//highlight first row by default
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 ???
try using this
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] == 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.
i hope this will help.
i didnt get you.... sorry.....
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.
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.