A data table jQuery plugin.
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
});
- IE6+
- Chrome
- Safari 4+
- Firefox 3.5+
- Opera
- Report a bug
- To contribute or send an idea, github message me or fork the project
Grid use UglifyJS2
you should have installed nodejs and run npm install uglify-js -g
.
nice Grid is available under the terms of the MIT License.