Hello Gordon,
Thank you for the feedback.
I have a impression that you use local export and now you tell us about server side export.
At the moment it is not possible to manipulate the excel export in a way you do it, but this is a good idea and we will consider this in our future release.
In all cases I will let you know about the result.
Thank you for the recommendation
Kind Regards,
Will
Guriddo Support Team
Hello,
Sorry for the late answer and the property is described not correct in the presentation.
First of all the options isExported and exporttype are passed as parameters in the formatter and not into the formatoptions.
Second which is needed to be note is that these are valid only when the datatype is local. This is described well in the JavaScript documentation here and here.
Below is exmple of using these options in PHP
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
$grid->setGridOptions(array( ... "datatype"=>"local", ... )); $grid->setColProperty("OrderID", array( "label"=>"ID", "width"=>60, "formatter"=>"js:"."function( value, options) { if( options.isExported) { if(options.exporttype === 'pdf') { return '(' + value + ')'; } } return value }" )); |
I need to note again that the datatype should be set local this to work.
The same can be done in PHP.
To set a global formatting in excel for integers use
|
1 2 3 4 |
... $grid->setExcelOptions( array( "format_int"=>"#0" )); |
To set a particular formatting for certain row use excel_format
|
1 2 |
... $grid->setColProperty(‘myfield’, array( "formatoptions" => array( "excel_format" => "#.0"))); |
More on this can be read here
Please let us know if you need more assistance on this or explain us in detail what is need to be formatted and how
Kind Regards,
Will
Guriddo Support Team
Hello,
Thanks. We will update the docs as per your note.
Another way is to use the ajaxSelectOptions (which is grid parameter) the same way as in edit options (with postData)
|
1 2 3 4 5 6 7 8 9 |
jqGrid({ ... ajaxSelectOptions : { postData : function (rowid, value, cmName) { return { myId: rowid; } } } ... }); |
Regards,
Will
Guriddo Support Team
Hello,
Not sure what you mean, but you can get any time the current selected row with
|
1 2 3 |
... var selId = $("#grid").jqGrid('getGridParam', 'selrow'); ... |
This will give you the id of the current selected row – i.e the id of the current edited row.
Kind Regards,
Will
Guriddo Support Team
Hello,
The buttons in inline navigator have a specific id’s when they are created. The rules are as follow:
gridid plus _iladd – for adding
gridid plus _iledit – for edit
gridid plus _ilsave – for saving
gridid plus _ilcancel – for canceling editing
By example if the id if the grid is jqGrid then to call the button for add a row you can
|
1 2 3 |
... $("#jqGrid_iladd").trigger("click"); ... |
Kind Regards,
Will
Guriddo Support Team
Hello,
After creating the jqGrid try with this code:
|
1 2 3 4 |
var mygrid = $("#jqGrid")[0]; $(mygrid.grid.bDiv).scroll(function(e){ console.log(this.scrollTop); }); |
Kind Regards,
Will
Guriddo Support Team
Hello,
Please send us a working example with demo data demonstrating the problem. We can’t reproduce the problem.
Another possible reason for this is that the property is valid only for datatype : local . If you try to export the data thorough the server this option is not valid.
In order to do this you will need to check the export at server (check for oper excel) and set the columns to non hidden when export is on.
Please confirm that this is the case in order to make you a example with this.
Kind Regards,
Will
P.S. The option is considered to be added in case of PHP export at server
Guriddo Support Team
Hello,
Thanks for the post. There was a problem with this option, which currently is fixed in GitHub. You can download the fixed version from here replacing only the JavaScript file.
Please do not forget to clear your browser cache after replacing the new file.
If the problem persist after this, please prepare a full functional demo which demonstrates the problem.
In all cases, please let us know about the result.
Kind Regards,
Will
Guriddo Support Team
Hello,
First of all thank you for the reminding.
We are ready with this, but before to post it, could you please let us know if you have recommendation on what should be added or updated.
Thank you
Kind Regards,
Will
Guriddo Support Team
Hello,
The name property should be in lower letter, while the label property can be any string.
This is correct:
|
1 2 3 4 5 |
{ "name":"rgt", "label" : "Rgt", "hidden":true } |
This is not correct:
|
1 2 3 4 5 |
{ "name":"Rgt", "label" : "rgt", "hidden":true } |
Please provide a demo or send it to us which shows the problem.
Information about the version and css used is highly appretiated.
Kind Regards,
Will
Guriddo Support Team
Hello,
First of all this is very old demo with version 3.8 which is 6 and more years old and we do not recommend you in any case to look at it.
Please before to use any code see the version used.
Actually this demo destroy the grid and recreate it again with new colModel.
In principle you can do this with the pivot too.
Kind Regards
Will
Guriddo Support Team
Hello,
The gridUnload is not called the way you post it. It is a old way.
The way way to call unloading of the grid is:
|
1 2 3 |
... $.jgrid.gridUnload("grid_id") ... |
where the grid_id is the id of the grid.
In php you will need to call it with setJSCode or within other method with js code.
Please do not mix PHP code with JavaScript.
We have explained here how to call JavaScript in PHP jqGrid.
About the creation of dynamic columns demo – where you find this demo? Please provide a link!
In the next couple of days we will try to prepare a demo with master detail, where the detail is pivot. We will look into the code and see if we can add a possibility to modify the pivotgrid colModel.
Kind Regards,
Will
Guriddo Support Team
Hello,
Thank you for the demo and the fix provided.
Your fix is accepted and we have put it in the GitHub.
The fix will be available in next release.
Kin Regards,
Will
Guriddo Support Team
Hello,
Sorry I can’t dowmload the code. Nothing happen. What I see is only this
Just in case You can send the file to: support at guriddo dot net.
Thank you
Kind Regards,
Will
Guriddo Support Team
Hello,
You can try the custom error like in this example
If this does not meet your requirements, open the driver used (by example jqGridPdo.php) and look into the function errorMessage. It is called every time a error occur.
Kind Regards,
Will
Guriddo Support Team
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top