Grid選中一個欄位帶值到另一個欄位的程式範例
範例說明, 產品欄位選中的產品的單價帶到單價欄位.
產品用InfoRefVal元件,要設定:
onSelect:dataGridDetailProductIdOnSelect
selectOnly:true

        function dataGridDetailProductIdOnSelect(selectedRow) {
            var unitPrice = selectedRow.UnitPrice;
            var editingRowIndex = $('#dataGridDetail').datagrid('getRowIndex', $('#dataGridDetail').datagrid('getSelected'));
            var editor = $('#dataGridDetail').datagrid('getEditor', { index: editingRowIndex, field: 'UnitPrice' });
            $(editor.target).val(unitPrice);
        }