Hello,
In the first link provided in my previous post you should select which event is right for you. As I say afterSubmit is fine. The event should be added not as grid event, but as form editing event
The code can look like this:
|
1 2 3 4 5 6 7 8 |
$refreshtoday = <<<ENDTODAY function() { jQuery(“#detail”).trigger(“reloadGrid”); } ENDTODAY; $grid->setNavEvent('add','afterSubmit', $refreshtoday); |
Kind Regards,
Will
Guriddo Support Team
Hello,
You should tell at which side you want to run this event.
If you want to run it at client side you may need to use afterSubmit – http://www.trirand.com/jqgridwiki/doku.php?id=wiki:form_editing
If you want to do do something at server you can use custom update/add methods or use setAfterCrudAction : http://www.guriddo.net/demo/demos/jqgrid/editing_data/after_edit/default.php
Kind Regards,
Will
Guriddo Support Team
Hello,
Just for the record – the problem here was that the id column was not set. The problem is resolved when the key: true property was set in the appropriate place in colModel
Kind Regards,
Will
Guriddo Support Team
Hello,
We are glad to here that the problem is resolved.
Kind Regards,
Will
Guriddo Support Team
Hello,
We can not reproduce the problem. Everything at our end work normal.
You have some errors in the page that maybe cause the problem.
The sequence is not correct:
|
1 2 3 4 5 6 7 |
<script src="js/tables.js" type="text/javascript"></script> </body> </head> <body> |
Body tag end before its definition. We can put your example online in order to see that there is no such error.
It is possible that you include the navGrid outside the jqGrid scope.
Kind Regards,
Will
Guriddo Support Team
Hello,
Which refresh button you push and what do this action. If you reload the page, then you should have the new records.
If you refresh via ajax you may need to put maybe again the multiselect(‘refresh’) method.
All depend what you do with this refresh button.
Could you please post a test for this purpose?
Thank you.
Kind Regards,
Will
Guriddo Support Team
Hello again,
Just to know we do not have a option enableClear as set in your code – it makes me think, that you either have modify the jqGrid code for your needs or you have another settings that you do not have posted here
Kind Regards,
Will
Guriddo Support Team
Hello,
As I say before, mtype GET or POST does nothing to do with local searching.
To demostrate this I have copy paste your code. The only that is changed is the url and the postData set as object.
Please look at your code and what you do again.
Here is your test code (one to one)
Kind Regards,
Will
Guriddo Support Team
Hello,
I tried to do object way and I get error as variables are not recognized by jqGrid as those variables are out of the scope.
Not sure if this is true. It all depend how you try to do this:
By example this will work as setting in grid
|
1 2 3 |
... postData: { myvar: '{Division: "' + _division+ '", GLNum: "' + _glNum+ '"}' }, ... |
Note how we do this. You can then get server side myvar and do what youwant.
Actually postData is the data parameter in in jQuery ajax function.
If it is not possible for you to change this you can simple set postData as empty object after the grid. Something like this
|
1 2 3 |
$("#jqGrid").jqGrid({...}); $("#jqGrid").jqGrid('setGridParam', {postData : {}}); |
This is possible since you use loadonce true and your data is going local.
Kind Regards,
Will
Guriddo Support Team
Hello,
Maybe it is a good idea to put a nag message for this purpose.
Thank you
Kind Regards,
Will
Guriddo Support Team
Hello,
Thank you very much for the clarifications and the code.
Kind Regards,
Will
Guriddo Support Team
Hello,
Please re download the demo and be a sure you have replace all the needed files.
Regards
Will
Guriddo Support Team
Hello,
Thanks for the test case and data.
The problem, that you have is incorrect setting of post data – you set it as string, but it is object.
To work this replace:
|
1 2 3 |
... postData: '{Division: "' + _division+ '", GLNum: "' + _glNum+ '"}', .. |
with
|
1 2 3 |
... postData: {Division: _division, GLNum: _glNum }, ... |
Kind Regards,
Will
Guriddo Support Team
Hello,
We see that you do not set search operators.
The default search operator is begin with. This does not work on numbers.
By example you can set for number equal operator. This can be something like this:
|
1 2 3 4 5 6 7 8 9 10 11 12 |
colModel: [ { label: "GL Acct. No", //sorttype: 'integer', name: 'GLAcct', index:'GLAcct', width: 120, search: true, searchoptions: { sopt:['eq']...}, }, ... |
This will tell qjGrid to use the equal operator when search on this field.
Kind Regards,
Will
Guriddo Support Team
Hello,
Glad to hear that everything is going as expected. Thank you for the feedback.
Kind Regards,
Will
Guriddo Support Team
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top