![]() |
Flexigrid - Lightweight but rich data grid - 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 - Lightweight but rich data grid (/showthread.php?tid=7179) |
Flexigrid - Lightweight but rich data grid - El Forum - 04-10-2008 [eluser]dark_lord[/eluser] [quote author="Armorfist" date="1207855651"][quote author="wish_bear" date="1207854967"] Ei, armor? I have used your code snippet for the CI integration of Flexigrid, but when I deploy all of your files from what you have specified, still it does not query or show any data at all. What could I possibly missed out? reconfiguring? I have set the database name to the database that i am using. still no luck.. Please help me I am stock.[/quote] Could be a path problem, did you deploy the files in a fresh CI instalation?[/quote] Is that the best possible solution? To have a fresh CI installation? Flexigrid - Lightweight but rich data grid - El Forum - 04-10-2008 [eluser]Armorfist[/eluser] [quote author="ecarsted" date="1207804972"]Heya Paulo, Armorfist I got the cell click thingy working ![]() In Armofist's example online, he shows the add , delete icons on every row. Question I have is how did you get the icons to the cell? Looking at Amorfist's code it looks like he added to the CSS. But I can't figure out what he did. What I want to do is put a little info icon in the cell, and when they click it, I process another query to get detail data. I guess I need to figure out what the id is for that row too. Eric[/quote] Hello Eric, In my example I simply added the HTML to the data corresponding to that that column. Json Code: Code: {id:'1',cell:['1','AF','AFGHANISTAN','<span style=\'color:#ff4400\'>Afghanistan</span>','AFG','4','<a href=\'#\'><img border=\'0\' src=\'public/images/add.png\'></a> <a href=\'#\'><img border=\'0\' src=\'public/images/close.png\'></a> ']} Flexigrid - Lightweight but rich data grid - El Forum - 04-10-2008 [eluser]Armorfist[/eluser] [quote author="wish_bear" date="1207855924"][quote author="Armorfist" date="1207855651"][quote author="wish_bear" date="1207854967"] Ei, armor? I have used your code snippet for the CI integration of Flexigrid, but when I deploy all of your files from what you have specified, still it does not query or show any data at all. What could I possibly missed out? reconfiguring? I have set the database name to the database that i am using. still no luck.. Please help me I am stock.[/quote] Could be a path problem, did you deploy the files in a fresh CI instalation?[/quote] Is that the best possible solution? To have a fresh CI installation?[/quote] Its the easy solution not the best ![]() - What value do you have in your "base_url" config (in application/config/config.php) - Do you have the default CI path structure? (application/controller/) - If so, what do you get if you access http://yoururl/ajax Flexigrid - Lightweight but rich data grid - El Forum - 04-10-2008 [eluser]dark_lord[/eluser] [quote author="Armorfist" date="1207855651"][quote author="wish_bear" date="1207854967"] Ei, armor? I have used your code snippet for the CI integration of Flexigrid, but when I deploy all of your files from what you have specified, still it does not query or show any data at all. What could I possibly missed out? reconfiguring? I have set the database name to the database that i am using. still no luck.. Please help me I am stock.[/quote] Could be a path problem, did you deploy the files in a fresh CI instalation?[/quote] Still no luck dude, used a fresh installed CI now... still now data is shown. Flexigrid - Lightweight but rich data grid - El Forum - 04-10-2008 [eluser]dark_lord[/eluser] here are the values that I got when I used the Code: http://localhost/jf/index.php/ajax/index {page: 1,total: 239,rows: [{id:'1',cell:['1','AF','AFGHANISTAN','Afghanistan','AFG','4',' ']},{id:'2',cell:['2','AL','ALBANIA','Albania','ALB','8',' ']},{id:'3',cell:['3','DZ','ALGERIA','Algeria','DZA','12',' ']},{id:'4',cell:['4','AS','AMERICAN SAMOA','American Samoa','ASM','16',' ']},{id:'5',cell:['5','AD','ANDORRA','Andorra','AND','20',' ']},{id:'6',cell:['6','AO','ANGOLA','Angola','AGO','24',' ']},{id:'7',cell:['7','AI','ANGUILLA','Anguilla','AIA','660',' ']},{id:'8',cell:['8','AQ','ANTARCTICA','Antarctica','','',' ']},{id:'9',cell:['9','AG','ANTIGUA AND BARBUDA','Antigua and Barbuda','ATG','28',' ']},{id:'10',cell:['10','AR','ARGENTINA','Argentina','ARG','32',' ']}]} and then here is my base_url and my index page $config['base_url'] = "http://localhost/jf/"; $config['index_page'] = "index.php"; Yup I think I do have the default SYSTEM/APPLICATION/CONTROLLER directory What do you think is the problem bro?.. :-( Flexigrid - Lightweight but rich data grid - El Forum - 04-10-2008 [eluser]Armorfist[/eluser] Open the file "system/application/controller/flexigrid.php", go to line 44 and change: Code: $grid_js = build_grid_js('flex1','ajax/',$colModel,$buttons,'id','asc','auto','400',$this->config->item('fg_per_page')); to Code: $grid_js = build_grid_js('flex1','/jf/index.php/ajax/index',$colModel,$buttons,'id','asc','auto','400',$this->config->item('fg_per_page')); I think the first one should work, but lets see if that solves the problem. The second function parameter is the URL which the data is retrieved. In this case the "ajax" controller. To see what the other arguments represent open the "system/application/helpers/flexigrid_helper" file and read the function comments. Flexigrid - Lightweight but rich data grid - El Forum - 04-10-2008 [eluser]dark_lord[/eluser] [quote author="Armorfist" date="1207857464"]Open the file "system/application/controller/flexigrid.php", go to line 44 and change: Code: $grid_js = build_grid_js('flex1','ajax/',$colModel,$buttons,'id','asc','auto','400',$this->config->item('fg_per_page')); to Code: $grid_js = build_grid_js('flex1','/jf/index.php/ajax/index',$colModel,$buttons,'id','asc','auto','400',$this->config->item('fg_per_page')); I think the first one should work, but lets see if that solves the problem. The second function parameter is the URL which the data is retrieved. In this case the "ajax" controller. To see what the other arguments represent open the "system/application/helpers/flexigrid_helper" file and read the function comments.[/quote] You are a genius dude!!! Nicely solve!!! Cheers! Thanks for the great help! I've been figuring this our all night long... :-( Thanks for the great help. Kudos! Flexigrid - Lightweight but rich data grid - El Forum - 04-10-2008 [eluser]Armorfist[/eluser] Glad I could help! ![]() Flexigrid - Lightweight but rich data grid - El Forum - 04-10-2008 [eluser]dark_lord[/eluser] [quote author="Armorfist" date="1207858400"]Glad I could help! ![]() One more question? How come my first column of my record does not display(e.g. ID)? It starts with the second column (e.g. Name)? What could be the problem with my code? Flexigrid - Lightweight but rich data grid - El Forum - 04-10-2008 [eluser]Armorfist[/eluser] Did you modify the /system/application/controller/ajax.php controller? If so can you post the "foreach" code, the one that runs through all db query records? |