GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - stepgr/codeigniter-smartgrid: A simple PHP datagrid control for CodeIgniter framework with Bootstrap

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
application
application
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 

Repository files navigation

CodeIgniter SmartGrid

A simple PHP datagrid control for CodeIgniter with Bootstrap support

SmartGrid 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
  • Documentation

Demos

  • Basic
  • Array Datasource
  • with DataTables

Requirements

  • CodeIgniter 3.x
  • Bootstrap 3+

Installation

  1. Download 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

Example usage

on your controller:

// 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:

<!-- For styling, refer the bootstrap from CDN or from your server. 
Ignore this if you already have included in main view -->

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
// 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 now

Version

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

License

MIT License

About

A simple PHP datagrid control for CodeIgniter framework with Bootstrap

techlaboratory.net/smartgrid

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.