New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refreshing grid features after editing #953
Comments
Hello Udi, Sorry for the delay in the answer - for some reasons I have missed your questions. As for the second issue - which editing module is used? |
Hi Tony, Thanks, |
Hello Udi, I checked the problem regarding cellattr and it is a bug. I will reopen the issue until the bug is fixed. |
Hello Udi, |
Hi Tony, Well, Yes and No. Thank you |
Hello, Thank you for the feedback Thank you. |
Hi Tony, OK, I found the issue. There's a parameter into the "cellattr" event which is called "rawObject". When the grid is first constructed this parameter holds all the fields of the row. But after the editing is done and the "cellattr" is triggered again, the rawObject only holds the edited fields, the id and an "oper" field. Looks like this is actually the object which is sent to the server upon save. I'm wondering, is this the way it should be or is it a bug? Thanks, |
It is not a bug, but it is a way the methods work. By example in inline editing we use setRowData method, where the thing happen. One possible solution is to get the data from the row before to save the new one and merge it with the edited data, but this way we go to catch 22 - we can not get the row data (getRowData) when we are in editing mode - I hope you understand the problem. The same logic is for setCell when we use cell editing. One possible solution would be to pass all the needed data from within editing module, but I need to make some investigations. If you have any idea, please let me know. |
Hi Tony, OK, I see the problem here. What I'm doing is to use the "serializeRowData" event and then I add the original (before edit) rowData into the payload (a JSON encoded object with "originalData" name) that is sent to the server. Then this object becomes available for me inside the "cellattr" event and I can use it for my decisions on the attributes. |
Hello Udi, I see that for inline and form editing the problem can be fixed. In these modules we have all the needed data (editable and not editable cell values) which can be passed to setRowData and hence the cellattr will have all the needed information. The only limitation will be if the datatype is xml - in this case the rawObject will be json object and not xml node. Actually this parameter is not correct put in the method. The correct way is to use the 5 parameter of this event which in all cases is json object. The cell editing need some extra code to fix this problem. I will try to fix the problem for inline and formedit today and for the cell editing to the end of week |
Udi, I have fixed the problem (I think). If you have time you can test it and let me know if it is working as expected. |
Hi Tony, I don't see any difference. I still cannot see the other fields in the cellattr. I only see the edited fields. |
Can you prepare a example, which demonstrate the problem and post it here or send me a link? Thank you. |
Hi Tony, |
Ok. Prepare and describe in detail where you expect this data. Note that all the data is added in setRowData (which executes at end when everything is fine) and not during any events in the editing module. |
Hello Udi, I will close the issue. If you will, please feel free to reopen it. |
Hello,
I'm facing 2 related issues which are both happening after editing:
I'm wondering if there is any service function which could be called for refreshing those.
Updating jqGrid to do this automatically would also be very nice.
Thanks,
Udi
The text was updated successfully, but these errors were encountered: