Skip to content

niceue/nice-grid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

jQuery grid plugin.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published