SMART datagrid v.1 > Classes > ValueColumn

[ grids ver.1.3.5]   Back  Forward

DataLudi.ValueColumn.tooltipCallback  property

Callback function which returns HTML to be displayed in tooltip when the mouse is over data cell of being included in this column for Certain Time


function (index: CellIndex): String;

You can specify callback for all column cells in GridBody.tooltipCallback, and if specify this property, GridBody callback will be ignored. In addition, if specify DataCellRenderer.showTooltip in cell renderer which is specified in each column or individual cell, it will automatically display the tooltip for the corresponding renderer and ignore this property. 

In order to display tooltip, nonempty HTML should be returned from this callback, and DisplayOptions.showTooltip should be specified as true first. 

Defaults to null.

Getter
function tooltipCallback(): Function
Setter
function setTooltipCallback(value: Function)
Code -1
    grid.setColumns([{
        name: "Amount",
        fieldName: "amount",
		tooltipCallback: function (index) {
		    var val = index.getValue();
		    if (!isNaN(val)) {
                return 'Original Amount:' + '<br>' +
                    '<b>' + DataLudi.formatNumber('#,##0.00', val) + '</b>';
		    }
		},
		...
	},
	...
	]);
See Also
DisplayOptions.showTooltip
GridBody.tooltipCallback
DataCellRenderer.showTooltip
Examples
Tooltips