Does anybody have an example of a DataTable, where a row is inserted, but the row is only saved/committed when all columns have been populated? Perhaps pressing escapes undoes the insert
My alternative solution is to create a form for it, on submit the values get appended to the DataTable, but I figured trying to do it via DataTable might be cleaner.
Well, you can use “onBeforeEditStop” to loop the table and put some conditions which will trigger ajax call that will save your row if conditions are true.
For anybody else looking. I want to insert a new row for the user to populate, which I do when a button is clicked, it fires the following
var click_add_asset = function()
{
var row_id = $$("asset_table").add({id: 9999});
this.editRow(row_id);
}
But the problem I had was the Save is being called automatically with add()… Adding in Rules does appear to have done the trick I’ve got a DataTable defined as follows