SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.showToast  method

Display the toast view which transfers a simple message before running a function which takes a long time. 

Specify the settings which will consist the toast view by parameter options. If visible is set as false in options or message is an empty value or not specified, it will not display the toast view. 

In addition, you can specify the function which will run after displaying the toast by action, and even if the setting cannot display the toast, this function will still be run. 

function showToast (options: ToastOptions|Object, force: Boolean, action: Function);
Returns
Void
Parameters
options - ToastOptions|Object. required.
The setting information which will be transferred to Toast view. If visible is false or message is empty, it will not display the toast.
force - Boolean.
If it is false, it will not proceed when the toast view has already been displayed. If it is true, it will close the existing toast view and display newly.
action - Function.
It specifies callback function which will be run after displaying toast view. Even if it has set to not display toast view, this function will be run.
Code -1
    var toast = {
        message: "Calculate...",
        styles: {
            background: "#ff0000",
            color: "#ffff00",
            fontSize: "20px"
        }
    };
    grid.showToast(toast, true, function () {
        // long time process...
        ...
        // hide toast
        grid.hideToast();
    });
Note
See Also
hideToast
ToastOptions
Examples
Toast View