Forum


18:23

19/10/2010

Hello,
I have the following problem.
When I create a Grid – and as a part of configuration provide handler function for – lets say: onSelectRow, like this:
colNames:['Inv No','Date', 'Client'],
colModel:[...],
onSelectRow: function(rowid, status){ alert(rowid); }
});
It works like a charm and pops up alert dialog with selected row ID.
In my project I'm importing grid configuration using 'jqGridImport' and I would like to add / bind event handler after the grid is complete, so probably on importComplete event.
The problem is that if I'm trying to add handlers later on, they do not work:
Type 1:
onSelectRow: function(rowid, status){alert(rowid);}
});
Type 2:
Both examples do not work. Can you please tell me how should this be done correctly?
I will really appreciate any help, thank you!
01:42

10/08/2009

Hello Andrea,
The event beforeSubmit is not a general jqGrid event so you can't use setGridParam to set it dynamically. I don't know which way for it exist in the commercial jqGrid version (probably you can ask a question of the trirand.net forum). Nevertheless one way will be work independent from the implementation. You can use
jQuery.extend(jQuery.jgrid.edit, {
beforeSubmit : function(postdata, formid) {
/*your implementation*/
}
});
to define beforeSubmit or any other event of editGridRow function of form editing.
Best regard
Oleg
Most Users Ever Online: 715
Currently Online:
76 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