Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
...
Info | ||
---|---|---|
| ||
In Figure 1, we can add in more spreadsheet properties available in the library documentation. The configuration here is formatted as JSON. Usually for simple configurations, a single object and value in Custom Settings would suffice. But for more complex ones, this configuration can be used in combination with a Custom HTML form element to complete a functionality. Do scroll down below for a few examples referenced from the documentation.
|
...
Code Block | ||
---|---|---|
| ||
<script>
$(function(){
var hot = FormUtil.getField("_yourSpreadsheetFormElementIdHere_").data("hot");
//console.log(hot.getSettings());
//hot.setDataAtRowProp(0, '_yourcellColumnIdHere_', '_myNewValue_');
});
</script> |
After performing example 3 above, we can use the script below to programmatically add new rows into the speadsheet.
Code Block | ||
---|---|---|
| ||
<script> 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-') </script> |
Reference: https://jsfiddle.net/ck4859zm/