![]() |
Flexigrid CodeIgniter Implementation - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Flexigrid CodeIgniter Implementation (/showthread.php?tid=11362) |
Flexigrid CodeIgniter Implementation - El Forum - 05-09-2010 [eluser]anata_arie[/eluser] I mean open url : http://localhost/flexgrid/index.php/ajax/ If there are appear json data like this: {"page":1,"total":"8","rows":[{"id":"1","cell":["1","AF","AFGHANISTAN","Afghanistan<\/span>","AFG","4","<\/a> "]},{"id":"2","cell":["2","AL","ALBANIA","Albania<\/span>","ALB","8","<\/a> "]},{"id":"3","cell":["3","DZ","ALGERIA","Algeria<\/span>","DZA","12","<\/a> "]},{"id":"4","cell":["4","AS","AMERICAN SAMOA","American Samoa<\/span>","ASM","16","<\/a> "]},{"id":"5","cell":["5","AD","ANDORRA","Andorra<\/span>","AND","20","<\/a> "]},{"id":"6","cell":["6","AO","ANGOLA","Angola<\/span>","AGO","24","<\/a> "]},{"id":"7","cell":["7","AI","ANGUILLA","Anguilla<\/span>","AIA","660","<\/a> "]},{"id":"8","cell":["8","AQ","ANTARCTICA","Antarctica<\/span>",null,null,"<\/a> "]},{"id":"9","cell":["9","AG","ANTIGUA AND BARBUDA","Antigua and Barbuda<\/span>","ATG","28","<\/a> "]}]} That is mean your data has been loaded but there are some problem with your browser or something. But if there are some message error, what is it? Flexigrid CodeIgniter Implementation - El Forum - 05-09-2010 [eluser]newbieCI[/eluser] [quote author="anata_arie" date="1273477497"]I mean open url : http://localhost/flexgrid/index.php/ajax/ If there are appear json data like this: {"page":1,"total":"8","rows":[{"id":"1","cell":["1","AF","AFGHANISTAN","Afghanistan<\/span>","AFG","4","<\/a> "]},{"id":"2","cell":["2","AL","ALBANIA","Albania<\/span>","ALB","8","<\/a> "]},{"id":"3","cell":["3","DZ","ALGERIA","Algeria<\/span>","DZA","12","<\/a> "]},{"id":"4","cell":["4","AS","AMERICAN SAMOA","American Samoa<\/span>","ASM","16","<\/a> "]},{"id":"5","cell":["5","AD","ANDORRA","Andorra<\/span>","AND","20","<\/a> "]},{"id":"6","cell":["6","AO","ANGOLA","Angola<\/span>","AGO","24","<\/a> "]},{"id":"7","cell":["7","AI","ANGUILLA","Anguilla<\/span>","AIA","660","<\/a> "]},{"id":"8","cell":["8","AQ","ANTARCTICA","Antarctica<\/span>",null,null,"<\/a> "]},{"id":"9","cell":["9","AG","ANTIGUA AND BARBUDA","Antigua and Barbuda<\/span>","ATG","28","<\/a> "]}]} That is mean your data has been loaded but there are some problem with your browser or something. But if there are some message error, what is it?[/quote] An Error Was Encountered The configuration file flexigrid.php does not exist. But flexigrid.php have my libraries ajax.php function index() { $valid_fields = array('COMPLAIN_NO'); $this->flexigrid->validate_post('COMPLAIN_NO','asc',$valid_fields); $records = $this->operator_model->get_countries(); $this->output->set_header($this->config->item('json_header')); foreach ($records['records']->result() as $row) { $record_items[] = array($row->COMPLAIN_NO, $row->COMPLAIN_NO, ); } $this->output->set_output($this->flexigrid->json_build($records['record_count'],$record_items)); } Flexigrid CodeIgniter Implementation - El Forum - 05-09-2010 [eluser]anata_arie[/eluser] Check folder system/configuration/ , is there file flexigrid.php? and don't forget to changes: controller\ajax.php line 39 Code: //Print please Flexigrid CodeIgniter Implementation - El Forum - 05-09-2010 [eluser]newbieCI[/eluser] [quote author="anata_arie" date="1273479066"]Check folder system/configuration/ , is there file flexigrid.php? and don't forget to changes: controller\ajax.php line 39 Code: //Print please Fatal error: Cannot redeclare class Flexigrid in C:\wamp\www\CI\system\application\config\flexigrid.php on line 16 Flexigrid CodeIgniter Implementation - El Forum - 05-09-2010 [eluser]anata_arie[/eluser] [quote author="newbieCI" date="1273481956"][quote author="anata_arie" date="1273479066"]Check folder system/configuration/ , is there file flexigrid.php? and don't forget to changes: controller\ajax.php line 39 Code: //Print please Fatal error: Cannot redeclare class Flexigrid in C:\wamp\www\CI\system\application\config\flexigrid.php on line 16[/quote] I'm sorry, please don't copy file flexigrid.php from controller folder configuration folder. Read detail at http://flexigrid.eyeviewdesign.com/ and place the files like that demo that you can donwnload it from that site. Flexigrid CodeIgniter Implementation - El Forum - 05-10-2010 [eluser]newbieCI[/eluser] [quote author="anata_arie" date="1273483520"][quote author="newbieCI" date="1273481956"][quote author="anata_arie" date="1273479066"]Check folder system/configuration/ , is there file flexigrid.php? and don't forget to changes: controller\ajax.php line 39 Code: //Print please Fatal error: Cannot redeclare class Flexigrid in C:\wamp\www\CI\system\application\config\flexigrid.php on line 16[/quote] I'm sorry, please don't copy file flexigrid.php from controller folder configuration folder. Read detail at http://flexigrid.eyeviewdesign.com/ and place the files like that demo that you can donwnload it from that site.[/quote] Flexigrid CodeIgniter Implementation - El Forum - 05-10-2010 [eluser]newbieCI[/eluser] [quote author="newbieCI" date="1273489437"][quote author="anata_arie" date="1273483520"][quote author="newbieCI" date="1273481956"][quote author="anata_arie" date="1273479066"]Check folder system/configuration/ , is there file flexigrid.php? and don't forget to changes: controller\ajax.php line 39 Code: //Print please Fatal error: Cannot redeclare class Flexigrid in C:\wamp\www\CI\system\application\config\flexigrid.php on line 16[/quote] I'm sorry, please don't copy file flexigrid.php from controller folder configuration folder. Read detail at http://flexigrid.eyeviewdesign.com/ and place the files like that demo that you can donwnload it from that site.[/quote][/quote] A PHP Error was encountered Severity: Notice Message: Undefined property: stdClass::$record_count Filename: models/operator_model.php Line Number: 23 {"page":1,"total":null,"rows":[{"id":"235","cell":["235"]},{"id":"236","cell":["236"]},{"id":"237","cell":["237"]},{"id":"238","cell":["238"]},{"id":"239","cell":["239"]},{"id":"240","cell":["240"]},{"id":"241","cell":["241"]},{"id":"243","cell":["243"]},{"id":"244","cell":["244"]}]} public function get_countries() { //Select table name $table_name = "COMPLAIN"; $this->db->select('COMPLAIN_NO')->from($table_name); $this->CI->flexigrid->build_query(); $return['records'] = $this->db->get(); $this->db->select('count(COMPLAIN_NO) as record_count')->from($table_name); $this->CI->flexigrid->build_query(FALSE); $record_count = $this->db->get(); $row = $record_count->row(); $return['record_count'] = $row->record_count; return $return; } Flexigrid CodeIgniter Implementation - El Forum - 05-10-2010 [eluser]anata_arie[/eluser] changes : $return[‘record_count’] = $row->record_count; to $return['record_count'] = $row->RECORD_COUNT; change all Field Name ($row->[Field Name]) as Capital character. Flexigrid CodeIgniter Implementation - El Forum - 05-10-2010 [eluser]newbieCI[/eluser] [quote author="anata_arie" date="1273501345"]changes : $return[‘record_count’] = $row->record_count; to $return['record_count'] = $row->RECORD_COUNT; change all Field Name ($row->[Field Name]) as Capital character.[/quote] Thanks for alll But,Why if I search can be happen? just "Processing Please wait" again Flexigrid CodeIgniter Implementation - El Forum - 05-17-2010 [eluser]newbieCI[/eluser] [quote author="mosos" date="1228144816"]quick search function wont work @oracle with active record. any solution?[/quote] same problem do you got it to solve this pr |