Forum


12:40

Moderators
30/10/2007

Hello,
I do not think that loadComplete is a good choice. Better you can use gridComplete and then
gridComplete: function () {
var firstid = $("tr:first","#mygrid").attr("id");
$("#mygrid").setSelection(firstid);
}
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
11:00

19/12/2008

Hello,
It seems that this solution doesn't work anymore. I upgraded each version up to 3.6.4, but I didn't notice when this occured. The returned id is always null (the row is not found).
I'm not a jQuery expert... I tried these :
But none worked.
Any idea ?
Regards.
11:56

Moderators
30/10/2007

Hello,
in firefox do
var test1 = $("tr:first","#mygrid")
console.log(test1);
and so on -
see what is happen in the console tab
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
12:42

19/12/2008

I tried something else : I added a custuml button on my grid that calls your script :
In this case, the result is OK in the console !
Is it possible that when the gridComplete is fired, the rows are not in the table yet ??
I tried with :
- jqGrid 3.6.3 / 3.6.4 : same problem
- jQuery 1.3.2 / 1.4.1 : same problem
15:18

19/12/2008

Sorry, forget the point, I have a stange side effect whith my own javascript... I had a condition in order to make the selection of the first row only on the page load (not on grid reload), but when I remove this condition, everything works fine...
Strange, but I don't have many time to investigate... So it's okay like that.
Most Users Ever Online: 715
Currently Online:
156 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66