[eluser]bhakti.thakkar[/eluser]
hello,
i want to load data of a table in a flexigrid. but i am facing problem in loading the grid. it just displays me headers of the table with "Processing, please wait ..." below the grid.
no images of the button gets loaded. no errors as well. but i was just trying to trace whether it was querying the table. but record count is also not fetched. there is some problem in the model i feel
Relation_Model.php
Code:
<?php
class relations_model extends Model {
function relations_model()
{
parent::Model();
$this->obj =& get_instance();
}
function get_relations_flex()
{
//Select table name
$table_name = "Relation_T";
//Build contents query
$this->db->select('Relation_ID,Name_VC,Address_VC,PostalCode_VC,City_VC,Country_ID')->from($table_name);
$this->flexigrid->build_query();
//Get contents
$return['records'] = $this->db->get();
//Build count query
$this->db->select('count(id) as record_count')->from($table_name);
$this->flexigrid->build_query(FALSE);
$record_count = $this->db->get();
$row = $record_count->row();
//Get Record Count
$return['record_count'] = $row->record_count;
//Return all
return $return;
}
}
i think the flexigrid library isnt getting loaded. but if i try to put $this->load->library('flexigrid');
it gives me the error or redeclaration. can anyone please help me on this
thanks in advance