SMART datagrid v.1 > Examples

Back  Forward

Toast View  Example

Toast View means to display a simple message on the grid before running the function which takes a long time. 

You can call GridBase.showToast to display the toast and GridBase.hideToast to close it. In addition, there are some properties to specify whether to display the toast when it takes a long time to run the function in the grid internally, like OperateOptions.sortingToast

The parameter options of showToast can transfer the settings with which will organize the toast view. If visible has been set as false in the options or message is an empty value or not specified, the toast view will not be displayed. 

message:
Grid - 1
rows

After displaying the toast, the function to be executed can be specified by action, and it will execute even if the settings cannot display the toast. 

Code -1
    grid.showToast("Calculate...", true, function () {
        // Long-time calculation
        ...
        // Hide the toast
        grid.hideToast();
    });

View Source JSP 

See Also
GridBase.showToast
GridBase.hideToast
OperateOptions.sortingToast
OperateOptions.filteringToast
OperateOptions.groupingToast
ToastOptions
Examples
Lazy Data Loading