Here is the solution to solve this question:
1. When appending a new row, set a 'isNewRow' property indicating this is a new added row.
$('#dg').datagrid('appendRow',{status:'P',isNewRow:true});
2. Use the 'onBeforeEdit' event to prevent from editing the 'A' field on the old rows.
$('#dg').datagrid({
onBeforeEdit: function(index,row){
var col = $(this).datagrid('getColumnOption','A');
if (row.isNewRow){
col.editor = 'textbox';
} else {
col.editor = null;
}
},
onAfterEdit: function(index,row){
row.isNewRow = false;
}
})