Hello,
Thanks a lot for your response
My requirement is slightly different from your example as in this example the user have to calculate the total (of amount + tax) manually but in my case I am having a total column in my DB which is storing the sum of the entered amount and tax. Now i need to display that total from the DB. Basically I am able to save the data using the “saveRow” method but I am not able to reload the entire row data from the DB. I don’t think there is any way in this where I can load the data of a single row from the Db values .. correct me if I am wrong. So, an alternative solution which I thought will work is that updating the row data using “setRowData” method in the callback function. So, I have added a callback function named “checksave” in “saveRow” method as its 2nd parameter.
See below ..
se = “”;
And as a result of the update query I have returned a complete string in the “checksave” function from my server.php. See below …
$total = $_POST + $_POST;
$response=$_POST.’^|^{amount:”‘.$_POST.'”,tax:”‘.$_POST.'”,total:”‘.$total.'”,note:”Updated …”}’;
echo $response;
As a result of the above lines, I am getting in my checksave function, is the rowID concatenated by “^|^” and then complete row data.
Then I am using ..
var resultData = result.split(‘^|^’); // split result to get the rowID in resultData [0] and data string in resultData[1].
// Setting rowData
var su=jQuery(“#rowed2”).setRowData(resultData [0],resultData[1]);
“su” above is alerting “true” which i believe is returning after successful updation of rowData.
But If, I am using getRowData() method to get the value of row on the basis of rowID stored in resultData[0] in my case, I am getting nothing its blank.
Is there any other solution / alternative to get the work done?
Thanks once again!
Ashish