Forum
Topic RSS
14:30
19/12/2008
OfflineTrying to use a couple of examples in the forum to have some basic error checking. Does anyone have an example of catching server errors when inserting data? Any help, examples, posts will help.
partial code:
$("#adddata").click(function(){ jQuery("#rpsrgrid").editGridRow("new",{height:180,reloadAfterSubmit:true, closeAfterAdd:true})
afterSubmit : function checksave(result) {....}
Noting happens now, just want to make sure I can debug and/or provide error control.
02:44
Moderators
30/10/2007
OfflineHello,
Maybe this will help:
jQuery(”#rpsrgrid”).editGridRow(”new”,
{height:180,
reloadAfterSubmit:true,
closeAfterAdd:true,
afterSubmit : function() {
// your code goes here
}
});
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.
09:59
04/02/2011
OfflineJust what I need Tony, thanks!!! BTW, in new notation it will be
jQuery("#rpsrgrid").jqGrid('editGridRow', 'new', ….
But what if I would like to call en external function from here?
How to make that?
I've got both edit buttons - in row and in footer.
It's ok when calling external function from footer, but it doesn't work when we using described method
20:04
10/08/2009
OfflineProbebly you should use recreateForm:true as additional parameter for both Add and Edit forms.
If you don't use the parameter the Add and Edit dialogs will be shared and created only once. Next the gialog will be not destroyed and recreated every time. Instead of that the dialog will be only hidden/shown. It follows to many side effects. I created the feature request with the suggestion to change the default value from recreateForm:false to recreateForm:true.
If the setting will not help you you should post the full code example which can be used to reproduce the problem.
Best regards
Oleg
08:17
04/02/2011
OfflineHmm, actually no change in behavior! For this code:
onclick="jQuery('#list').jqGrid('editGridRow', '" + cl +"', {recreateForm: true, reloadAfterSubmit:true, modal: false, closeAfterAdd:true, closeAfterEdit:true, afterSubmit:function(response) { clientCallBack(response) } });
"clientCallBack(response)" was called only once - when "save" button was pressed for the first time.
How to check form values for all others savings not only first? Or what I'm doing wrong please?
11:40
10/08/2009
OfflineSorry mojopower, but what you posted is not a code which can be used to reproduce your problem. It should be full JavaScript and full HTML code. At least one row of data which should be edited is also required to reproduce your problem. If you want that somebody help you you should reduce the work of your helper. Moreover many effects exist only together with the usage of some other things. In general afterSubmit are called not once (I have many examples where it work correct). So one need your code having the problem.
One thing I don't understand absolutly from your last post. Why your code start with "onclick="? I suppose that you try to use the feature in absolutely exotical way.
Best regards
Oleg
12:47
04/02/2011
OfflineOleg, please take a look at "Row Editing" -> "Custom Edit" sample at http://www.trirand.com/blog/jq.....qgrid.html
Here is the exotical code, starting with "onclick=" and sample, where the afterSubmit is called once only – first time you click submit with any options.
Please, try – i used this sample to reproduce the behavior.
-- my code --
onclick="jQuery('#list').jqGrid('editGridRow', '" + cl + "', {recreateForm: true, reloadAfterSubmit:true, modal: false, closeAfterAdd:true, closeAfterEdit:true, afterSubmit:function(response) { clientCallBack(response) } });"
...
<script language="javascript" type="text/javascript">
function clientCallBack(serverArgs) {
alert('Just once!');
}
</script>
14:41
10/08/2009
OfflineI am a user like you (see my status as "Member" like youth and "Moderator" like th status of the developer of jqGrid Tony)!
You want to use a free open source software and you want that someone who also use tha same software help you. If you wait for sombody in the world help to solve your problem for free you should be polite and prepare your problem so that other, who decide help you, could at least easy reproduce your problem. See for example questions from other people or look at my answers where I post frequently a link for a working solution.
Oleg
15:48
04/02/2011
OfflineMan! You want to help people, don't you? You answered my question, didn't you? Thanks for your help actually!
I thought it is easy to implement callback function in official demo sample, it is just couple rows of code!
You asking me to prepare a small project just because you can't spent half a minute to try to understand what I meant?
Yes, I know mate that you are user like me, and even Tony is developer - so what?
What is the difference between GNU or MTI project developer and forum user, hm?
Let's be polite to each other and be respectfully to the whole project, not just to you, ok?
br bro
Most Users Ever Online: 994
Currently Online:
18 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
Log In
Home
