如何將DataGrid明細欄位加總累計到主檔DataForm的欄位來呢?
$(document).ready(function () {
            $("#dataGridDetail").datagrid({
                onAfterEdit: function (rowIndex, rowData, changes) {
                 rowData.Amount = rowData.UnitPrice * rowData.Quantity;
                    $(this).datagrid('refreshRow', rowIndex);
                }})});
//加總至Master欄位。DataGridDetail Amount欄位Total屬性設定sumOnTotal屬性定義此方法
function mytotal(rowData) {
            $('#dataFormMasterTotalAmt').val(rowData.Amount);
        }
//DataFormMasterOnApply屬性定義此方法
function formApply() {
            endEdit($('#dataGridDetail'));
        }