onViewInit

fires before an inner view of spreadsheet is initialized

void onViewInit(string|number id,object config){ ... };

Parameters

idstring|numberthe inner view ID
configobjectthe object with a view configuration

Example

webix.ui({
    view:"spreadsheet",
    data:spreadsheet_data,
    on:{
        onViewInit:function(view, config){
            if (view == "toolbar" && window.innerWidth < 1400){
                config.elements = [{
                    view:"scrollview",
                    scroll:"x",
                    body:{ cols:config.elements }
                }];
            }
        }
    }
});

Related samples

Details

The event can be used to make changes in the UI of inner components, e.g. the toolbar, the context menu or the bottom bar.

See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix javascript ui library and page of javascript spreadsheet product.