Borders and Gridlines, JavaScript Programming Example of Borders and Gridlines in SpreadSheet

JavaScript Programming Example of Borders and Gridlines in SpreadSheet

You can easily customize Webix SpreadSheet. The coding sample below shows how you can add buttons which allow users to hide headers and gridlines of the table. All coding samples in this section are free.

JS Code

webix.ready(function(){
  var buttons = {
    width:200, type:"space",
    rows:[
      { view:"toggle", type:"form", onLabel: "Show gridlines", offLabel: "Hide gridlines",  on:{
        onChange: function(value){
          $$("ssheet").hideGridlines(value);
        }
      }},
      { view:"toggle", type:"form", onLabel: "Show headers", offLabel: "Hide headers",  on:{
        onChange: function(value){
          $$("ssheet").hideHeaders(value);
        }
      }},
      {}
    ]
  };
  webix.ui({
    cols:[
      buttons,
      {
        view:"spreadsheet",
        id:"ssheet",
        toolbar: "full",
        data:{
          data:[
            [3,2,"Webix"],
            [3,3,"SpreadSheet"]
          ]
        }
      }
    ]
  });
});