Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/techlab/codeigniter-smartgrid
A simple PHP datagrid control for CodeIgniter framework with Bootstrap
https://github.com/techlab/codeigniter-smartgrid
bootstrap codeigniter datagrid mysql
Last synced: 3 days ago
JSON representation
A simple PHP datagrid control for CodeIgniter framework with Bootstrap
- Host: GitHub
- URL: https://github.com/techlab/codeigniter-smartgrid
- Owner: techlab
- License: mit
- Created: 2016-08-06T19:10:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-19T09:46:50.000Z (over 7 years ago)
- Last Synced: 2024-05-01T20:45:08.388Z (6 months ago)
- Topics: bootstrap, codeigniter, datagrid, mysql
- Language: PHP
- Homepage: http://techlaboratory.net/smartgrid
- Size: 19.5 KB
- Stars: 18
- Watchers: 2
- Forks: 16
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-codeigniter - SmartGrid for CodeIgniter - Simple datagrid control for CodeIgniter framework with Bootstrap. (Libraries)
README
# CodeIgniter SmartGrid
### A simple PHP datagrid control for CodeIgniter with Bootstrap supportSmartGrid focus on data display than data manipulation.
We are starting with limited features to make the code very simple and robust,
yet we will be adding more feature on the go. The code is very simple and well documented, which make it easy for customization.+ [Homepage](http://techlaboratory.net/smartgrid)
+ [Documentation](http://techlaboratory.net/smartgrid/documentation)Demos
-----
+ [Basic](http://techlaboratory.net/smartgrid/demo/example-smartgrid)
+ [Array Datasource](http://techlaboratory.net/smartgrid/demo/example-array-grid)
+ [with DataTables](http://techlaboratory.net/smartgrid/demo/example-smartgrid_and-datatables)Requirements
-----
+ [CodeIgniter 3.x](https://codeigniter.com/download)
+ [Bootstrap 3+](http://getbootstrap.com/getting-started/#download)Installation
-----
1. [Download](https://github.com/techlab/codeigniter-smartgrid/archive/master.zip) the source files
2. Copy the folder and files `application/libraries/SmartGrid/` to `application/libraries/` folder of your CodeIgniter installation
3. That's it! Start using with the examples below or at [application/controllers/Example_smartgrid.php](https://github.com/techlab/codeigniter-smartgrid/blob/master/application/controllers/Example_smartgrid.php)Example usage
-----
on your controller:
```php
// Load the SmartGrid Library
$this->load->library('SmartGrid/Smartgrid');// MySQL Query to get data
$sql = "SELECT * FROM employee";// Column settings
$columns = array("employee_id"=>array("header"=>"Employee ID", "type"=>"label"),
"employee_name"=>array("header"=>"Name", "type"=>"label"),
"employee_designation"=>array("header"=>"Designation", "type"=>"label")
);
// Set the grid
$this->smartgrid->set_grid($sql, $columns);// Render the grid and assign to data array, so it can be print to on the view
$data['grid_html'] = $this->smartgrid->render_grid();// Load view
$this->load->view('example_smartgrid', $data);
```and then, on your view:
```html```
```php
// Print the grid html
echo $grid_html;
```
Features
-----
+ Simple datagrid for data display
+ Accepts both MySQL query and array data
+ Automatic Pagination
+ Uses Twitter Bootstrap for styling, so easy to style with any bootstrap template
+ No extra css or js files to include
Limitations
-----
- Add, Edit, Del, Themes, Export, Search and Sort are not supported
- Search, Sort, Themes, Export features are on pipeline
- Database support: MySQL only for now
- Language support: English only for now
- Ajax is not support nowVersion
-----
**SmartGrid v0.6.5-beta**
> Notice:- SmartGrid is on beta version, usage on production environment is not recommended unless tested well.
> Please report issue at [github issues](https://github.com/techlab/codeigniter-smartgrid/issues/)License
----
[MIT License](https://github.com/techlab/codeigniter-smartgrid/blob/master/LICENSE)