This code works fine. But I want reload the datagrid and add new row. Is that possible and How?
onBeginEdit: function(index,row){
var dg = $(this);
var editors = dg.edatagrid('getEditors',index);
for(var i=0; i<editors.length; i++){
$(editors.target).textbox('textbox').bind('keydown',function(e){
if (e.keyCode == 13){
dg.edatagrid('endEdit', index);
// if (index<dg.edatagrid('getRows').length-1){
// dg.edatagrid('selectRow', index+1).edatagrid('beginEdit', index+1);
// }
//$('#dg').edatagrid('reload');
$('#dg').edatagrid('addRow');
}
});
}
if (editors.length){
$(editors[0].target).textbox('textbox').focus();
}
}