Help with saving a row
sstyle opened this issue · 2 comments
When I save a cell into base I use editor:save event
grid.events.on("editor:save", function (data, $cell) {
console.info("Column:", '@'+grid.getCellColumn($cell)+'@');
jQuery.ajax({
type: "POST",
url: "upd.php",
dataType:"text",
data:'ID='+grid.getRowData(grid.getCellRow($cell))["ID"]+'&Val='+grid.activeEditor.getValue()+'&Pole='+grid.getCellColumn($cell)+'&Text='
});
});
What is the best solution to save a new row to DB? When I add a new row I type something cell by cell. So it use editor:save event instead others.
I really need your help. please...
The event editor:save
should be used to save single cell value (e.g., for an UPDATE statement), but to save a whole row, you should use row:save
event (e.g., for an INSERT statement).
Check out the example.js file for an example on how to use row:save
event.