I am trying to have code that will delete records from ListGrid that is bound to local data. And if the last record is removed start editing a new one.
cellClick:
function (record, rowNum, colNum)
{
if (colNum == 4 && record != null)
{
record.file_id = -1;
this.removeData(record,
function ()
{
if (this.data.getLength() == 0) this.startEditingNew();
}
);
}
This code does remove the record, it also works at this.data.getLength() while showing 1 even when it is last record that has been removed, but at this.startEditingNew() it fails saying no such property.
Could you help?
Thanks