Jsgrid Javascript Grid Framework

init method

The method init is used to initialize a grid view with input parameters. A grid must be initialized before executing other methods. The unit of width, height and gutter properties has been desinated as "px".

Syntax

objgrid.init({input parameters})

Parameters

id - id of div tags to be the container of the grid view.

rows - total number of rows to be generated.

column - total number of columns to be generated.

width - width of grid cell.

height - height of grid cell.

gutter - gutter between the cells.

onlycolumn - default false, true when no grid cell but only columns generated.

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

Grid View