$(document).ready(function () {
$("#dataGridDetail").datagrid({
onAfterEdit: function (rowIndex, rowData, changes) {
rowData.Amount = rowData.UnitPrice * rowData.Quantity;
$(this).datagrid('refreshRow', rowIndex);
}})});
//加總至Master欄位。DataGridDetail Amount欄位Total屬性設定sum、OnTotal屬性定義此方法
function mytotal(rowData) {
$('#dataFormMasterTotalAmt').val(rowData.Amount);
}
//DataFormMaster的OnApply屬性定義此方法
function formApply() {
endEdit($('#dataGridDetail'));
}