can figure out whats wrong? always returns faluire
function addItem() {
var rowCount = $('#grid').getGridParam('records');
var lastRow = $('#grid').getRowData(rowCount - 1);
var newRow = lastRow;
newRow.Id = "0";
newRow.Person = "";
newRow.Date = "";
var newItem = $('grid').addRowData(rowCount - 1, newRow);
if (newItem == true) {
alert('success');
}
else { alert('falire'); }
}