Look at this example
It works as expected.
Note that the conversion is done at PHP server and not at client, so the posting is correct according to the rules.
P.S. setUserDate format the date in the datepicker, so you do not need to to give other formats of the date. Note that the datepicker uses JS date formatting, while jqGrid uses PHP one and the conversion from PHP to JS in datapicker is done automatically from the script
Kind Regards,
Will
Guriddo Support Team
Hello,
You clear the filter variables, but not the form fields, which by default are set to be not recreated.
To make this work, you will need to set recreateFilter property set to true, which by default is false.
This options should be set in searching options.
If you have difficulties, please let us know.
Please replay if the problem is resolved or not.
Kind Regards,
Will
Guriddo Support Team
Hello,
The html5 support is added in version 5.3 JS, which will be available in PHP version around 5-7 February.
Kind Regards,
Will
Guriddo Support Team
Hello,
I’m not sure that I understand the question correct.
If you mean that the formatting of the field in grid can be different in form editing the answer is yes . Please let us know what exactly you want to do, so that we can give you the best answer.
Kind Regards,
Will
Guriddo Support Team
Hello,
There is a method called getSqlQuery() , but the dificulties is that it should be called after the main methods queryGrid, editGrid, renderGrid in order to get the right query.
I’m not sure that this will do the job. Actually the final query is generated on these three basic methods.
Kind Regards,
Will
Guriddo Support Team
Hello,
Unfortunately there is no build in solution.
One possible solution is when you click the refresh button to get the data of the main grid in array and then use setRowData method to update the main gid.
In this case the subgrid stay in a state as it is.
Kind Regards,
Will
Guriddo Support Team
Hello,
The afterSubmit event used in form editing accept 3 parameters:
– response is the data returned from the server (if any)
– postdata is the data sent to the server
– oper – determine in which mode is called – add when add row and edit when it is edited
If nothing is changed in the default settings of prmNames then the postdata rowid is stored in postdata.id property. In this case you can yse the following code to get the rowid in edit mode in case the datatype is not local
|
1 2 3 4 5 |
afterSubmit : function( response, postdata, oper) { if(oper === 'edit') { var rowid = postdata.id; } } |
Kind Regards
Will
Guriddo Support Team
Hello,
In the same settings where you set showOnLoad try to to set the following option
|
1 2 3 4 |
... showOnLoad=>true, overlay=>0, ... |
The options is described here
Also you can play with the top and left property to position the dialog.
Kind Regards,
Will
Guriddo Support Team
Hello,
The setJSCode method should be called only once. If you call it more than one time (like you do) the last code will be executed only.
To work this you should put all your javascript code in one variable and call setJSCode.
Kind Regards,
Will
Guriddo Support Team
Hello,
Can you please send to the support (support at guriddo dot net) the code, the dump of the tables in the code and if possible some test data.
It is not possible for us to see what is really happen with these description, so please if possible prepare these.
Thank you very much.
Kind Regards,
Will
Guriddo Support Team
Hello,
There are a lot of ways. I can recommend to use beforeSubmitCell event, where you can get the needed fields and return a object, which automatically extend the posted data in cell editing.
|
1 2 3 4 5 6 7 8 9 10 11 |
$beforesubmit = <<<BEFORESUBMIT function( rowId, name, val, iRow, iCol ) { var value_one = $(this).jqGrid('getCell', rowId, 'post_name1'); var value_two = $(this).jqGrid('getCell', rowId, 'post_name2'); ... // this object automatically is extended with the post data return { post_name1 : value_one, post_name2 : value_two,...}; } BEFORESUBMIT; $grid->setGridEvent("beforeSubmitCell",$beforesubmit); |
Please let us know if the problem is solved
Kind Regards
Will
Guriddo Support Team
Sorry do not see the cell edit. With cell edit only two values are posted – the id of the row and the value of the edited cell.
If possible get all the varaibles that are posted and check them before the execution of the setAfterCud operation.
Guriddo Support Team
Hello,
As far as I see the Javascript code for posting rditing data is located maybe in the function : showQuestion
Can you please show the code of this function?
Thank you.
Kind Regards,
Will
Guriddo Support Team
Hello,
I’m not sure that I understand the question. Did you mean to have a different labels in the subgrid headers instead of the names?
Please in the future post different topic when the question is different from the existing one.
Regards,
Will
Guriddo Support Team
In the script I do not see the table and the primarykeyId like this.
Please in the future when posting code switch in text mode (upper right corner of the editor) and the enclose the code with code tag like the code below:
|
1 2 3 |
$grid->table ="orders"; $grid->setPrimaryKeyId("OrderID"); |
Regards,
Will
Guriddo Support Team
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top