NEW VERSION RELEASED! Webix 11 Read More Core Updates, Extended Functionalities in SpreadSheet and File Manager and more

Reset SpreadSheet, JavaScript Programming Example of How to Reset SpreadSheet

JavaScript Programming Example of How to Reset SpreadSheet

Reset your SpreadSheet in one mouse click. See the coding sample showing how you can add the appropriate buttons to the toolbar. Don't hesitate to use this piece of code in your projects.

JS Code

webix.ready(function(){
  webix.ui({
    view:"spreadsheet",
    id:"ss",
    toolbar: "full",
    data:{
      data:[
        [3,2,"Webix"],
        [3,3,"SpreadSheet"] ,
      ]
    },
    subbar:{
      view:"toolbar", css:"webix_ssheet_toolbar", elements:[
        { view:"button", value:"reset to 5x10", width:240, click:function(){
          $$("ss").config.columnCount = 5;
          $$("ss").config.rowCount = 10;
          $$("ss").reset();
        }},
        { view:"button", value:"reset to 10x20", inputWidth:240, click:function(){
          $$("ss").config.columnCount = 10;
          $$("ss").config.rowCount = 20;
          $$("ss").reset();
        }}
      ]
    }
  });
});