Hello,
The bug is fixed only for export to excel – see GitHub.
The fix for PDF and CSV follow.
Please, let us know if the problem is fixed for you.
Kind Regards,
Will
Guriddo Support Team
Hello,
Thank you for the feedback. We are glad to help.
Kind Regards,
Will
Guriddo Support Team
Hello,
Ok understand. One possible solution is to use ajax as you suppose.
Suppose you have the jqGrid with multiselect and want to post the selected rows ID to the server.
Suppose you have a button with id ‘prinToPdf’ and grid with id ‘jqGrid’- the javascript code can look like
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
$("#prinToPdf").on("click", function() { // get the selected rows with multiselect var selectedRows = $("#jqGrid").jqGrid('getGridParam', 'selarrrow'); // check to see if there is no selection if(selectedRows.length > 0 ) { // convert to delemited string with ids like : 12, 34, 56,... var selRowStr = selectedRows.join(); // make ajax $.ajax({ url : 'myprontedrows.php', data : { rowIDs : selRowStr } success : function(...) { /// check if it is ok here and etc ... }, ... }); } }); |
At PHP server you should get the posted data ‘rowIDS’ – and use explode to convert the ids to array
|
1 2 3 4 |
$rowIDS = // get the rowIDS param here $toprint = explode(",", $rowIDS); |
and then it is easy …
Hope this helps
Kind Regards,
Will
Guriddo Support Team
Hello,
The question is very common. Please describe more details – where you want to get these values and etc, in what situation and etc.
Generally when multi select is is used in editing we post a comma separated values, but we do not know much more to help you.
Kind Regards,
Will
Guriddo Support Team
Hello,
If possible could you please send us a demo code with data or send us a link to the problem with detailed instructions?
You can send the requested info to support at guriddo dot net.
Thank you.
Kind Regards,
Will
Guriddo Support Team
Hello,
Thanks. We will check this problem.
Kind Regards,
Will
Guriddo Support Team
Hello,
The code is OK. It is working. We have tested it.
The only that you should pay attention here is what you return from server.
Please check the code at server:
|
1 2 3 4 5 6 |
... $.get('@Url.Action("StagesList")' + '?RouteId=' + thisval, function (data) { $("select#" + selRowId + "_stage").html(data); $("select#stage").html(data); |
What you return after this action.
You can simple test it without using jqGrid.
Kind Regards,
Will
Guriddo Support Team
Hello Andrea,
Thank you for the feedback.
Kind Regards,
Will
Guriddo Support Team
Hello,
Hidden column per definition can not be edited.
To edit this field do
|
1 2 3 4 5 |
... $grid->setColProperty('mFachbereich', array("editrules"=>array("edithidden"=>true))); ... |
Kind Regards
Will
Guriddo Support Team
Hello,
Why so complex?
There is a other method for this purpose: Look here
Regards
Will
Guriddo Support Team
Hello,
Everything is right in your description.
In first case the build in javascript confirm function stop the execution of everything into the window. As per definition we have :
“The confirm box takes the focus away from the current window, and forces the browser to read the message. Do not overuse this method, as it prevents the user from accessing other parts of the page until the box is closed.”
With other words the script wait for the input and depending on the click it continues (save) or not (stay)
In second case we have a JavaScript dialog. This dialog act as ajax – the popup display and the script continues to be executed and since noting is returned in onSubmitEvent we suppose it is true and the save is done.
One possible solution is to return false on this event, but when the user click save in the dialog you will need to save the cell using saveCell method but with onSubmit event false. The tricky part is set this event to null before save and and back after it is saved.
Here is a part of code using jQuery UI dialog:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
function confirmSave (id, name, value, iRow, iCol) { $( "#dialog" ).dialog({ autoOpen : true, modal: true, buttons: { Ok: function() { $( this ).dialog( "destroy" ); $("#jqGrid").jqGrid('setGridParam', {onSubmitCell : null} ); $("#jqGrid").jqGrid('saveCell', iRow, iCol); $("#jqGrid").jqGrid('setGridParam', {onSubmitCell : confirmSave} ); }, Cancel : function() { $( this ).dialog( "destroy" ); } }, close : function () { $( this ).dialog( "destroy" ); } }); return false; } $("#jqGrid").jqGrid({ ... celEdit : true, onSubmitCell : confirmSave, ... }); |
Kind Regards,
Will
Guriddo Support Team
Hello,
Sorry, we can not reproduce the problem.
What I can see is that one time you reload the grid in aftersavefunc and the same time edit.php return null.
I suggest you to set in delOptions in navGrid – reloadAfterSubmit to false.
If the problem is not fixed, please send us a link to the problem and if you do that do not forget to set the jqgrid source jquery.jqGrid.js instead of minified jquery.jqGrid.min.js
Kind Regards,
Will
Guriddo Support Team
Hello,
For us is very difficult to reproduce all clients problems and thus – will be possible to send us a working test case with data which demonstrates the problem?
Thank you
Kind Regards
Will
Guriddo Support Team
Hello,
One possible solution is to use custom validation (see editrules custom:true). This require to add the function for every field which is not good.
We have added aditional event onSubmitCell, which if return false the save is not performed.
The addition is in GitHub and you can test it.
Kind Regards,
Will
Guriddo Support Team
Hello,
Thank you for let us know.
Kind Regards,
Will
Guriddo Support Team
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top