Hello,
Export to excel and export to pdf are custom buttons, which are added in dynamically in the PHP code. That is the reason not to restore them.
Custom buttons are not restored, since we do not know about it (not exactly)
But… I will think about this – maybe we will do something (I do not promise)
Kind Regards,
Hello,
What you mean with – “reset operators”?
Do you want to delete them or do something else?
Please advise.
Kind Regards,
Hello,
Sorry that I do not mentioned this.
Can you please the post the response from the server which causes the problem?
The demo you provide is working fine.
Thank you
Kind Regards
Hello,
sorttype as function have sense only if you use datatype local.
You problem is in the server side sorting, since you you sorting is performed in server you will need to check your code at the server. jqGrid just accept the response after sorting and put the data in the grid.
Personally I think you should avoid sorttype as function and check your code at server sorting.
Kind Regards,
Thanks Chris.
With next release I hope that at end we will have a good docs.
Kind Regards,
Hello,
The problem you describe is “correct”.
I will notify you when the problem is fixed.
Thank you.
Kind Regards,
Hello Chris,
First of all Thank you very much for posting this solution.
Currently I do not have idea how to solve your problem with easy.
Maybe you really will need to change the names (id’s) of the grids on the different pages.
Just idea – after saving the grid state you may need to rename the key in localStorage like pagename+gridname, when loading you may need again to rename the key to gridname in order to display correctly the grid.
Kind Regards,
Hello Chris,
Did you mean SaveState and LoadState jqGrid methods?
If so, do you mean ToolBar filters?
A small test case will be very helpful.
Kind Regards,
Hello,
Can you please post full (or demo) code with test data.
Thank you.
Kind Regards,
Hello,
I’m not sure that I understand the problem.
Can you please provide a simple data that comes to the grid.
maybe you can use http://jsfiddle.net/ in order to post your demo code.
Regards
Hello,
I think that the problem you have is that you have missed to set the key:true option in the grid.
This option indicates which column will act as id row. For local data sources this is obligatory.
Try with the following settings:
|
1 2 3 4 5 6 |
colModel : [ { name: ‘id’, hidden: true, key : true }, ... ], ... |
Please let me know if this solves your problem.
Hello,
We have added this feature. In the valiudations array you will need to set displayName property
|
1 2 3 4 5 6 7 8 |
// Build server validations array $validations = array( 's_comments' => array("text"=>true, "required"=>true, "displayName"=>"Comment"), ... ); //set the rules $grid->setValidationRules($validations); |
Enjoy
Hello,
The example you point cover the most options used in validation.
The validation is made with seValidationRules method.
To this function is passed array with the following options
minValue => value
maxValue=>value
required=> true/false,
format=> string – the data format that is expected to be checked
The base types are
“number”,”float”,”int”,”integer”,”boolean”,”email”,”url”, “date”, “time”, “datetime”, “ip”
you will need to set it to true in order to have effect this – by example to define url you will need to :
“url”=>true
Additionally to that we have defined some custom types like this:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
public static $regexes = Array( 'date' => "^[0-9]{4}[-/][0-9]{1,2}[-/][0-9]{1,2}\$", 'datetime' => "^[0-9]{4}[-/][0-9]{1,2}[-/][0-9]{1,2}\$", 'time' => "^[0-9]{2}[:/][0-9]{1,2}[:/][0-9]{1,2}\$", 'alfanum' => "^[0-9a-zA-Z ,.-_\\s\?\!]+\$", 'not_empty' => "[a-z0-9A-Z]+", 'words' => "^[A-Za-z]+[A-Za-z \\s]*\$", 'phone' => "^[0-9]{10,11}\$", 'zipcode' => "^[1-9][0-9]{3}[a-zA-Z]{2}\$", 'plate' => "^([0-9a-zA-Z]{2}[-]){2}[0-9a-zA-Z]{2}\$", '2digitopt' => "^\d+(\,\d{2})?\$", '2digitforce' => "^\d+\,\d\d\$", 'anything' => "^[\d\D]{0,}\$", //incl empty 'string'=> "^[\d\D]{0,}\$", 'text'=> "^[\d\D]{0,}\$" ); |
As can be seen this is a public static array and if requiered there is a way to define your own validation rules. You will need just to extend this array with your own types.
Please let me know if you have any other questions.
Kind Regards,
Hello,
The method described from Will cover the paging and sorting.
In order to mark tracks of the actions you point you will then need to use the appropriate events – for resizing, reordering.
Example – for resizing you will need to use resizeStop , for reordering (sortable columns ) you will need to define the stop event like this
|
1 2 3 4 5 6 7 8 9 10 |
...jqGrid({ ... sortable : { options : { stop : function( event, ui ) { // code to save state } } }, ... |
Personally I think that this is not a trivial task and maybe it will require not trivial solution.
Kind Regards,
Hello,
First of all sorry for the late answer.
Thanks for the test case.
The problem is not in jqGrid, but a way rowspan works. In order this to work the table must have another column which is not rowspaned. – I will explain.
The froxzen columns clone the table and removes the columns that are needed to have a frozen property. The remaining table is the inserted into the div and this way we have a frozen property.
In your case the first two column are rowspaned, but there is missing another which column which should fix the issue.
At end we have the following content:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<table> <tbody> <tr class="jqgfirstrow" role="row"> <td role="gridcell" style="height:0px;width:70px;"></td> <td role="gridcell" style="height:0px;width:80px;"></td> </tr> <tr role="row" id="1" tabindex="-1" class="jqgrow ui-row-ltr ui-widget-content"> <td role="gridcell" style="text-align:center;" title="USA" aria-describedby="list_country" rowspan="5">USA</td> <td role="gridcell" style="text-align:center;" title="Texas" aria-describedby="list_state" rowspan="5">Texas</td> </tr> <tr role="row" id="2" tabindex="-1" class="jqgrow ui-row-ltr ui-widget-content "> <td role="gridcell" style="text-align:center;display:none" title="USA" aria-describedby="list_country">USA</td> <td role="gridcell" style="text-align:center;display:none" title="Texas" aria-describedby="list_state">Texas</td> </tr> .... </tbody> </table> |
You can check it and see that this does not work the way you want.
In order to fix the issue, either set the city column to be frozen or just add rownumbers : true, which will add the another visible column
Kind Regards,
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top