Hi,
Are you sure that the rowid's are unique in the grid ?
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.
I tried something else : I added a custuml button on my grid that calls your script :
console.log($("tr:first","#mygrid"))
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 :
I tried with the tr selector but the result shows nothing :

But it seems ok with the tbody selector $(“tbody:first”,”#mygrid”) :

But I don't undestand why I have this result in the first case ?!
Thanks…
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 :
$("tr:first", "tbody:first", "#mygrid").attr('id');
$("#mygrid tbody:first tr:first").attr('id');
$("#mygrid > tbody:first > tr:first").attr('id');
But none worked.
Any idea ?
Regards.
Thanks a lot : it was so simple…
In 3.5, there is a new functionnality : summary footer row that uses a second array (userdata) in the json result. Maybe you could use something like this to store your search parameters ?
I don't know if you can access to the json array in the client side script, but maybe Tony could tell us…
Hi,
If I remember, the two events I mentionned are only triggered when the field value is modified (I use jqGrid 3.5 and the events are correctly fired). And no, I don't see any other solution… sorry 🙁
Just a point : the code you mentionned is your real code ? If it is, it seems that you should call setCell from the grid object, like $('#mygrid').setCell
I was answering to your second problem : search parameters…
This is what I do :
(seach parameters input id's always stats with “gs_”)
Save search parameters (“memoriseFiltre” is a function that saves a cookie)
var initialLoad = true;
jQuery(“#mygrid”).jqGrid({…
loadComplete: function() {
I don't use XML bu json. Anyway, it seems to be the same logic.
If I understand your need, you need to give an extra ID (generated by your server), different from the record ID. You could then add it as a new data field in your XML and hide it in the grid. This field would then be available for your client side script.
Does it answer your question ?
I'm in cell edit mode
I used afterSaveCell : afterEditCell is triggered before any modification. You could also use beforeSaveCell.
Sorry, but I don't understand what you're trying to do…
Hi,
I posted the same problem earlier today 🙂 It's solved in 3.5.1 since yesterday 
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top