jQuery grid plugin.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
grid.css
grid.js
grid.styl
index.html

README.md

Grid

A data table jQuery plugin.

Usage

Include resources:

<link rel="stylesheet" href="path/to/grid.css">
<script type="text/javascript" src="path/to/grid.js"></script>

Initialization:

<div id="data_grid"></div>
$('#data_grid').grid({
    dataSource: 'controner/action',
    columns: [
        {title: "ID", field: "table_id"},
        {title: "Name", field: "table_name"},
        {title: "Contact", field: "table_contact"},
        {title: "Action", formatter: "action"}
    ],
    formatters: {
        action: function(row){
            return '<a href="#" fn="fEdit">Edit</a>';
        }
    },
    fEdit: function(e, row){
        e.preventDefault();
        //do something..
    }
});

Get an instance:

$('#data_grid').data('grid');

Refresh a grid:

$('#data_grid').grid('refresh');

Refresh a grid width params:

$('#data_grid').grid({
    //All support optionss
});

Documention

简体中文

Dependencies

jQuery 1.7+

Browser Support

  • IE6+
  • Chrome
  • Safari 4+
  • Firefox 3.5+
  • Opera

Bugs / Contributions

  • Report a bug
  • To contribute or send an idea, github message me or fork the project

Build

Grid use UglifyJS2 you should have installed nodejs and run npm install uglify-js -g.

License

nice Grid is available under the terms of the MIT License.