Definition

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

Figure 1 : Spreadsheet Form Element Properties - UI - Custom Settings

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

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.

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

 

Example 1 - Limit Cell Selection

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

https://handsontable.com/docs/6.2.2/Options.html#selectionMode

Use case: Limit the cell(s) that can be selected to only single cell.

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

Copy & paste this code snippet into Custom Settings.

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

{
    selectionMode: 'single'
}


Example 2 - Custom invalid cell style

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

https://handsontable.com/docs/6.2.2/Options.html#invalidCellClassName

Use case: Change the appearance of a cell if values does not match regex validation (regex configurable in spreadsheet properties).

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

First, use a Custom HTML form element to write a simple class style. Do use the !important notation only if the style is being overridden.

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

<style>
	.invalidCellCustom {
		background:pink !important;
	}
</style>

Then, copy & paste this code snippet into Custom Settings.

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

{
	invalidCellClassName: 'invalidCellCustom'
}


Example 3 - Get spreadsheet handsontable instance by form element ID

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

https://handsontable.com/docs/6.2.2/Core.html

Use case: Get the spreadsheet handsontable instance to use core functions.

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

First, copy & paste this code snippet into Custom Settings.

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

{
    "afterInit" : function() {
        var hot = this;
        $(hot.rootElement).data("hot", hot);
    }
}

Then, use a Custom HTML form element to get the 'hot' instance. After that, you are able to perform core functions on your specified spreadsheet element.

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

<script>
	$(function(){
    	var hot = FormUtil.getField("_yourSpreadsheetFormElementIdHere_").data("hot");
		//console.log(hot.getSettings());
		//hot.setDataAtRowProp(0, '_yourcellColumnIdHere_', '_myNewValue_');
	});
</script>




  • No labels