CI Easy Flexgrid Table

 

Download complete source code: here

Controller:

class Flexgrid extends CI_Controller {

function __construct() {
parent::__construct();
$this->load->model('flexgrid_model');
}

function index() {
$this->template->load("template", "flexgrid");
}

function jsondata($toLoad = 'list', $page = null, $search = null) {
switch ($toLoad) {
case 'list':
echo $this->flexgrid_model->getList($page, $search);
break;
default:
echo 'No Record Found.';
}
}

}

 

Model:

class Flexgrid_model extends CI_Model {

function __construct() {
parent::__construct();
$this->load->library("flex_table");
}

function SelectbyId($id) {
$this->db->where('id', $id);
return $this->db->get('signups');
}

function getList($page = null, $search = null) {
$sql = "Select users_id,user_fname,user_mname,user_lname,designation from acl_users
Where user_fname like '%$search%' OR user_lname like '%$search%'
order by user_fname ASC";
return $this->flex_table->getJSONRecord($sql, $search, $page, 10);
}

}

 

View:


cellpadding="2" cellspacing="0" id="usersTbl" name="usersTbl">First NameMiddle NameLast NameDesignation

One Response to “CI Easy Flexgrid Table”

  1. [...] jQuery plugin is part of jquery.pagectrl.js in CI Easy Flexgrid Table Tags: ComboPageLoader, [...]

Leave a Reply