![]() |
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-17-2010 [eluser]newbieCI[/eluser] [quote author="mosos" date="1228144816"]quick search function wont work @oracle with active record. any solution?[/quote] same problem with me.. do you have got this way to solve this problem? I hopefully... thanks Flexigrid CodeIgniter Implementation - El Forum - 05-17-2010 [eluser]newbieCI[/eluser] [quote author="anata_arie" date="1272437920"][quote author="mosos" date="1228144816"]quick search function wont work @oracle with active record. any solution?[/quote] I've success running flexigrid with oracle db (with CI version 1.7) but that searching still not running well. I've changed files: database\drivers\oci8\oci8_driver.php line 549-556 for clear escape string when we use active record Code: if (strpos($item, '.') !== FALSE) model/ajax_model line 44 Code: $return['record_count'] = $row->RECORD_COUNT; Code: $record_items[] = array($row->ID, Could anyone give me more solution to running that search feature. Tanks[/quote] Parse error: syntax error, unexpected T_IF, expecting T_FUNCTION in C:\wamp\www\CI\system\database\drivers\oci8\oci8_driver.php on line 549 do you help me? Flexigrid CodeIgniter Implementation - El Forum - 05-17-2010 [eluser]smatakajr[/eluser] Hey Guys First off Awsome script!! Saved me hella time in presentation very easy to maintain the only thing that i feel is weak with the script.. unless this was fixed and i dont know yet.. but the search implementation which is way cool but lacks query complexity.. I cannot get it to work with table abbreviations because i would have to write a custom search controller to handle this .. and the time i have is next to null if anybody has a search solution would be great.. but if i were to write one.. I would direct the search to a controller to handle a gloabal search and return the cols and rows dynamicly which would fit my solution.. the {SEARCH_STR} approach while quick and dirty works for simple country type selects but when you are in complex join structures.. the replace with predetermined $this-> info ... just dont cut it... dont get me wrong i love the script but i had to comment out the search append ![]() Thanks Ricky Flexigrid CodeIgniter Implementation - El Forum - 05-17-2010 [eluser]Unknown[/eluser] If you compare the controller, model and view from both versions, you will notice that my implementation is much cleaner and has minimum code repetition. That’s because all the data validation, generating javascript, handling and processing query’s is all handled by the library and helper file. Another great advantage in this is that if there is a major update to flexigrid (like paulo told the next release is going to be) where we must change the javascript code, and if we have 20 views with grids, the only thing you have to do is update the library and helper and you are good to go. In Czarchiac’s version you have to change every controller and every view to get it working again. Besides that, code separation, although it slightly complicates the implementation, is very important to code maintenance, that’s why I have two different controllers, one for the AJAX requests and the other one to generate the javascript and load the view. In conclusion, they are two very different implementations, mine is more solid and coded/structured for larger projects, Czarchiac’s is more simple (in a way), but messier thus not very good to maintain. Flexigrid CodeIgniter Implementation - El Forum - 06-18-2010 [eluser]- Obonk -[/eluser] some one help me please, i want to used search criteria on flexi grid based on the form that submitted. but the i`m stuck to pass the post variable to ajax controller so that it can be called using the query function on the model, can some one assist me please? Flexigrid CodeIgniter Implementation - El Forum - 06-18-2010 [eluser]smatakajr[/eluser] Hey Ok getting the search to work is a little tricky but here is how i implemented everything for a recent project You know what it will be easier to attach a file to the post then try to code here so ill do just that brb You want to note that i changed the function build_querys() in libraries/flexgrid.php to handle 2 types of returns on search queries, i needed to do this to seperate the "where" and "and" calls being tacked to different queries Ok man hope this helps, this is a full implementation example without the DB of cource ![]() Ricky Flexigrid CodeIgniter Implementation - El Forum - 06-19-2010 [eluser]- Obonk -[/eluser] how to baypass variable from the form so the variable can send to the ajax controller for making the WHERE clause Variable on the model???? Flexigrid CodeIgniter Implementation - El Forum - 07-02-2010 [eluser]anthrotech[/eluser] Good morning, Codeigniters! ![]() I have been trying to get this working for the past few weeks and I am lost as to what is not working. Nothing shows up in the web page, including the data grid header. Nothing. I have read and re-read the instructions and compared codes left and right. Syntax wise, everything looks correct to me. If someone could please review the codes I've implemented, I would greatly appreciate. Would love to get this working soon! Attached are the codes I am using in the Ajax controller, Member controller, Member model, and Member view. The JSON output looks like the following: Code: {"page":1,"total":"17","rows":[{"id":"1344","cell":["Emergency Contacts","1","Delete<\/a>"]},{"id":"1345","cell":["Allergies Information","1","Delete<\/a>"]},{"id":"1346","cell":["Prescribed Medications","1","Delete<\/a>"]},{"id":"1347","cell":["Over the Counter Medication","1","Delete<\/a>"]},{"id":"1348","cell":["Medical Conditions","1","Delete<\/a>"]},{"id":"1349","cell":["Hospitalizations","1","Delete<\/a>"]},{"id":"1350","cell":["Notes Physician","1","Delete<\/a>"]},{"id":"1351","cell":["Surgeries","1","Delete<\/a>"]},{"id":"1352","cell":["Social History","1","Delete<\/a>"]},{"id":"1353","cell":["Family History","1","Delete<\/a>"]},{"id":"1354","cell":["Primary Physician","1","Delete<\/a>"]},{"id":"1355","cell":["Specialty Physician","1","Delete<\/a>"]},{"id":"1356","cell":["General Info","1","Delete<\/a>"]},{"id":"1357","cell":["Location Info","1","Delete<\/a>"]},{"id":"1358","cell":["Contact Info","1","Delete<\/a>"]},{"id":"1359","cell":["Physician Notes","1","Delete<\/a>"]},{"id":"1360","cell":["Immunizations","1","Delete<\/a>"]}]} The js_grid looks like the following: Code: [removed]$(document).ready(function(){$("#flexigrid").flexigrid({url: 'https://iphh.localhost/ajax/display/action/preferences',dataType: 'json',sortname: 'NPPVTitle',sortorder: 'asc',usepager: true,useRp: true,width: 'auto',height: 400,rp: 15,rpOptions: [10,15,20,25,40],pagestat: 'Displaying: {from} to {to} of {total} items.',blockOpacity: 0.5,title: 'Hello',showTableToggleBtn: true,colModel : [{display: 'ID', name : 'NppvID', sortable: true, width : 40, align: 'center', hide : true},{display: 'Title', name : 'NPPVTitle', sortable: true, width : 180, align: 'left'},{display: 'Status', name : 'NPPV', sortable: true, width : 60, align: 'center', hide : true}],searchitems : [{display: 'ID', name : 'NppvID', isdefault: true},{display: 'Title', name : 'NPPVTitle', isdefault: true}],buttons : [{name: 'Delete', bclass : 'delete', onpress : test},{separator: true},{name: 'Select All', bclass : 'add', onpress : test},{name: 'DeSelect All', bclass : 'delete', onpress : test},{separator: true}]}); })[removed] I am using the following: Codeigniter 1.7.2 Jquery (Regular) 1.4.2 Flexigrid for Codeigniter 0.36 PHP 5.3.1 PHP JSON (via Macports) 2.17_0 Could the PHP JSON build via Macports be the problem? If so, any suggestions of work-arounds, other than coding the non-JSON approach? Thanks, Eliot Lee Flexigrid CodeIgniter Implementation - El Forum - 07-06-2010 [eluser]HomersBrain[/eluser] Hi Elliot Do you have the flexigrid table ID setup correctly in your html? Code: <table id="flexigrid" style="display:none"></table> Flexigrid CodeIgniter Implementation - El Forum - 07-07-2010 [eluser]anthrotech[/eluser] Hello Summer Student, Yes. I do have those codes in my view file. Nothing is printing, not even the table header. Do you think it may be a conflict with CSS? I am referencing the flexigrid CSS files correctly. Although there are many CSS files in the Web site I am working on with the same class names as the ones in the style.css file that comes with flexigrid. I did my best to replace those class names with others. Thanks, Eliot Lee |