Jsgrid Javascript Grid Framework

insertcolumns method

The method insertcolumns inserts a number of columns before the first column of the existing grid.

Syntax

objgrid.insertcolumns(n)

Parameters

n - represents the number of collumns to be inserted.

var pggrid = new jsgrid(); 
        pggrid.init({ 
        id:"wrp", 
        rows:5, 
        columns:5, 
        width:25, 
        height:25, 
        gutter:1,
        backgroundColor: "#d00000"
        }); 
     
pggrid.insertcolumns(10);

Grid View

The script above inserts 10 columns in front of the first column of the existing grid (5 columns). Now the number of columns is 15.