code: function(record, oData){
  
  		if(this.options.insertWithDialog) {
  			this.datatable.updateRow(record, oData);
  			return;
  		}
  		
  		var recordNode = Dom.get(this.datatable.getLastSelectedRecord()),
  		childNodes = recordNode.childNodes,
  		childNodeIndex = childNodes.length - 1,
  		innerDivNode = childNodes[childNodeIndex].childNodes[0];
  		
  		// Update Row with new record
  		this.datatable.updateRow(record, oData);
  		// Update the ADD / CANCEL buttons to "delete" text
  		innerDivNode.innerHTML = inputEx.messages.deleteText;
  		// Unselect Row and enable "Insert" button again
  		this.datatable.unselectRow(recordNode);
  		this.insertButton.disabled = false ;
  	}
docs: Validate the new record's row :
  You need to call this function when you really added the item with an id
  Ie if you trigger an Ajax request to insert your record into database,
  you trigger this function only if your request didn't failed