I want to set one field value in presubmit, but the value is always not change in datatable
I want to set one field value in presubmit, but the value is always not change in datatable
in my case, there is one calculation field (calculate the total amount), I put this calculation in presubmit even, I can see it has been change in pop-up edit window, when I click confirm button, all other fields value are correct, but the calculation field value is nothing, how can I do, it is urgent to me, thanks in advance.\
Benny
This discussion has been closed.
Replies
Hi Benny,
Can you show use the code you are using please? Or ideally, link me to the page so I can take a look and debug it live.
Thanks,
Allan
just simplify the code, it like below , pls help check, thanks a lot.
I'm not sure I fully understand the code above. It looks like you are using jQuery to get a
<currency_local>
element and setting its value to be 200. Am I right in assuming that you want to set thecurrency_local
property that is to be sent to the server? If so, use:Allan
Hi, Allen
Thanks a lot for your quick response, actually I am also set the value to o.data, just like your above clause, but the field currency_local is alway show 0 in main form, I have capture the HTML elements, only manual key in value in elements, the value set in presubmit does not take effect, do you have any simple sample for me reference,
Hi, Allen
You are right, it is my fault, appreciated!!!!
sorry, typo, allan, thanks^^
Good to hear that helped :-)
Allan
Hi, Allan & all
I still have one question, I found the object (o) has been update but the field value is not updated in datatable, seems any data change in presubmit action, datatable will not be refreshed even the backend object o is updated, do you have any method to resolve it or reload the datatable again.
Are you returning the data for the row in the
row
parameter from the server? The client / server comms protocol for Editor is documented in the manual with information about therow
parameter.Allan
Dear allan
We are not using client/server approach(ajax), the method is to overwrite local storage
part of code as below,
That's for the code. I don't see where it would be returning the
row
parameter, as described in the Editor manual? It looks like it is just returning the entire data structure.Allan
yes,you are correct,
anyway I am using another approach to update the row data, thanks ^^