datagrid js取得欄位代號及名稱的方法

var datagrid = $('#dataGridMaster');



var rowIndex =
$("#dataGridMaster").datagrid("getRowIndex",
$("#dataGridMaster").datagrid("getSelected"));



var field = 'CustomerID';



var row = datagrid.datagrid('getPanel').find('.datagrid-view1
.datagrid-body').find('tr[datagrid-row-index="' + rowIndex + '"]');



var value = row.find('td[field="' + field +
'"]>.datagrid-cell').html();



alert(value);