...
Code Block |
---|
|
<script>
$(function(){
var hot = FormUtil.getField("_yourSpreadsheetFormElementIdHere_").data("hot");
//console.log(hot.getSettings());
//hot.setDataAtRowProp(0, '_yourcellColumnIdHere_', '_myNewValue_');
});
</script> |
Example 4 - Add New Row using Javascript
After performing example 3 above, we can use the script below to programmatically add new rows into the speadsheet.
Code Block |
---|
|
var col = hot.countRows();
hot.alter('insert_row', col, 1);
hot.setDataAtCell(col, 0, '-Name-');
hot.setDataAtCell(col, 1, '-Surname-');
hot.setDataAtCell(col, 2, '-Age-') |
Reference: https://jsfiddle.net/ck4859zm/