Hello,
I think I should explain what is happen.
When you do loadonce true the datatype becomes local and the grid sorting paging and etc are performed with the local data array, but the editing is done on the server. This mean that all CRUD operations are done server side via ajax.
By default reloadAfterSubmit is true which means if the posting of the newdata is server side the grid expects, that reloading is done server side, but it is not since loadonce dynamically chnaged this.
In order to resolve your problem you must set reloadAfterSubmit to false. This causes the new data to be manipulated with the local grid functions and in the samne time the data to be posted on the server.
Simple do this:
|
1 2 3 |
$grid->setNavOptions('edit', array("reloadAfterSubmit"=>false)); $grid->setNavOptions('add', array("reloadAfterSubmit"=>false)); |
which will resolve the problem. In this case there is no need to put additionally reloadGrid in any code.
Kind Regards,
Will
Guriddo Support Team
Hello,
Both features can exists in the same time. Can you please send us a simple code so that we see what is happen?
Thank you.
Kind Regards,
Will
Guriddo Support Team
Hello,
The setColproperty is executed only once when the grid initializes – i.e when the script is executed for first time.
All other subsequent calls does ignore executing thus script.
Please do not mix PHP code with JavaScript one.
You may need to use some JavaScript code to change the editable property – i.e use setColProp JavaScript to change this property. Note that in case you use Form Editing you must set recreateForm to true.
Kind Regards,
Will
Guriddo Support Team
Hello,
Just to know in the future – you can download the code from GitHub if you click on Download button. After unzipting you will find the desired files jquery.jqGrid.js and jquery.jqGrid.min.js in JS subdirectory.
Kind Regards,
Will
Guriddo Support Team
Hello,
I’m not sure that I understand the question.
The PHP setSelect command is executed only once when the grid initializes. All other reloads, search and etc do not executes setSelect, so that that it refresh its values (If I understand the problem right).
Maybe solution with JavaScript code will solve the problem.
Kind Regards,
Will
Guriddo Support Team
Hello,
The code you posted is not good seen. When try to post code switch to text mode (not Visual as show in upper right corner of editor), mark the text and select code button at toolbar.
You can try to use dataInit event to bind this plugin. By example you can try
|
1 2 3 4 5 6 7 8 9 10 |
{label : "Student", name: "student_id", edittype: "select" editoptions: { dataUrl: "some.php" dataInit : function(element, options) { $(element).chosen(); } } } |
Maybe $(element).chosen() should be set in setTimeout in order to have time to load the data from server.
Kind Regards,
Will
Guriddo Support Team
Hello Alain,
To be a honest I don’t know. Not sure that I understand the problem.
Could you please explain it again?
Thank you
Kind Regards,
Will
Guriddo Support Team
Hello,
Thank you very much for pointing this problem.
Actually there was a smal bug and not good prepared example.
Because of the not autoloading nodes the treedatatype is local and reloading does not have effect. To work this we should disable reload after submit and add a code to put the returned id from the server.
Here is the modified example and here is the fix in gitHub
You may need to download the fixed code from GitHub and add the missed code in the example.
Do not forget to clear the browser cache before check the fixed example.
Kind Regards,
Will
Guriddo Support Team
Hello,
To be a honest we never try such plugin and do not know if this will go without problems.
You can try to apply this plugin after the grid initializes – and data is loaded (gridComplete is NOT recommended). you can apply this to ui-jqgrid-bdiv class.
Actually you can try :
|
1 2 3 4 |
... $("#grid").jqGrid({...}); $(".ui-jqgrid-bdiv").mCustomScrollbar(); ... |
We will try to test this too.
Kind Regards,
Will
Guriddo Support Team
Hello,
The question I think is too common.
The grid uses it own CSS again with the used CSS framework.
To remove the styling you can not include the css, but this will remove the styling of all the grids in the page. With other words it is not possible to have two or more grids on a page and apply a different style for each.
What you can do is to disable some properties of a certain grid knowing the id of the grid.
By example if you have id’s grid1 and grid2 the to disable the bordering of the grid1 you can
|
1 2 3 4 5 |
<style> #grid1 tr.jqgrow td { border: 0px none;} </style> |
Some example you may see here
Kind Regards,
Will
Guriddo Support Team
Hello,
In navGrid when you set del:true you can set additional delete parameters. This is the 4 parameter object:
|
1 2 3 4 5 6 7 8 |
$('#jqGridDetails').navGrid('#jqGridDetailsPager', { edit: false, add: false, del: true, search: false, refresh: false, view: false, position: "left", cloneToTop: false }, {}, {}, { serializeDelData : function( postdata ) {...}}, ... ); ... |
Kind Regards,
Will
Guriddo Support Team
Hello,
Glad to hear that it is working now.
Thanks for the recommendation. Will be fixed.
Kind Regards,
Will
Guriddo Support Team
Hello,
Sorry to be unclear. You will need just to replace grid.locale-de.js freom here: https://github.com/tonytomov/jqGrid/blob/master/js/i18n/grid.locale-de.js
Nothing more. We tested with this file and it seems to work fine for us. Do not forget to clear the browser cache after replacing the locale file.
Kind Regards,
Will
Guriddo Support Team
Hello Tom,
Thank you for reporting this bug. Incidentally a unneeded comma was put in odata property of search options in German locale.
We have fixed the problem in GitHub
You can download the new build from GitHub or simple the fixed German locale.
Please let us know if the problem is fixed.
Kind Regards,
Will
Guriddo Support Team
Hello,
First of all thank you for sending the test case with the data.
Having this for us was possible to find the problem. Actually you have a lot of worg setting in the code.
In order to work your code
In colModel give unique names of the empty fields something like this:
|
1 2 3 4 5 6 |
{ label: 'View Table', name: 'null', hidden: true, align: 'center' }, { label: 'Edit Order', name: 'view', hidden: true, align: 'center' }, { label: 'Copy Order', name: 'copy', hidden: true, align: 'center' }, { label: 'Cancel Order', name: 'cancel', hidden: true, align: 'center' }, |
Change the name of the field
|
1 2 3 4 5 |
... { label: 'OrdersDateSubmitted', name: 'OrdersDateSubmitted', hidden: true }, ... |
to something other like
|
1 2 3 4 5 |
... { label: 'OrdersDateSubmitted', name: 'DateSubmitted', hidden: true }, ... |
and finally define the field OrdersDateSubmitted like this:
|
1 2 3 4 5 6 7 8 9 10 11 12 |
... { label: 'DateSubmitted', name: 'OrdersDateSubmitted', sorttype: "date", formatter:"date", formatoptions: { srcformat: 'n/j/Y', newformat: 'm/d/Y' }, align: 'center' }, ... |
With these settings your code work as expected at our end. If you have trouble, please let us know we will send you the fixed code.
Kind Regards,
Will
Guriddo Support Team
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top