Welcome Guest, Not a member yet? Register   Sign In
Flexigrid CodeIgniter Implementation
#61

[eluser]mjsilva[/eluser]
Hei guys,

Just finish tunning up flexigrid to meet my needs and want to share with you.

I needed that flexigrid "remembers" the column width, search filters and page, so I decided to dig in the code and make it happen.

I used the Jason Valdron implementation witch already had column width to cookie after seeing his implementation it was more easy to make mine.

Here is the final code: http://pastebin.com/f66c1d534

So if you set cookies to true in parameters (is true by default) flexigrid should be save state after leaving the page, and should remain the same when u get back.

Test it and let me know if it works for you.

EDIT: You need to use http://plugins.jquery.com/project/cookie
#62

[eluser]mjsilva[/eluser]
Changed one line of code witch makes the clear button to clear page cookie: http://pastebin.com/f2159ccf7
#63

[eluser]langithitam[/eluser]
Hy mate,

Is there someone out there have implement add data function & make the grid editable?
I really appreciate it if wanna share it.

Thx,
Boby
#64

[eluser]langithitam[/eluser]
[quote author="N Narayanan" date="1225621381"]Hi Thank you, It is working now. Do you also have View, Add, Edit functions for the Grid?

Regards
Narayanan[/quote]

@N Narayanan did found solution for u'r problem, mate? I think i need it also..
#65

[eluser]zacklander2007[/eluser]
RS71 - 01 December 2008 12:50 PM

I’m searching for things that return no result and it keeps doing the ‘Processing, please wait…’ . Is there a way to make it say that there are no results instead of saying processing infinitely?

Also, it seems that you can’t search anymore until you reload the page. It gets stuck on the infinite processing.

Edit: Actually, you’re not able to do anything after it gets stuck.

quick fix:

controller\ajax.php line 39
//Print please
if (isset($record_items))
$this->output->set_output($this->flexigrid->json_build($records['record_count'],$record_items));
else
$this->output->set_output('{"page":"1","total":"0","rows":[]}');

good working man, thanks Alot!!
#66

[eluser]groyk[/eluser]
Starting with flexigrid

Hi CI Experts

I've just downloaded and tested flexigrid for CI.

But no data is loaded.

When I try to load "http://MyUrl/index.php/ajax" i get following error

Quote:A PHP Error was encountered

Severity: Notice

Message: Undefined property: Ajax_model::$db

Filename: models/ajax_model.php

Line Number: 31

Fatal error: Call to a member function select() on a non-object in C:\wamp\www\flexi\app\models\ajax_model.php on line 31
#67

[eluser]groyk[/eluser]
Figured it out!

Forgot to autoload database
#68

[eluser]aibanez[/eluser]
I'm trying to test the Flexigrid in my WAMP machine but I can't.
After downloading the example, I've created the database and the table (countries) I put all the parameters on database.php to connect with my DB, I put con config.php the necesary changes (base_url), I've modified the autoload.php with the autoload database and autoload URL helper, I've modified the routes.php with default_controler (flexigrid) but when I point my browser to flexigrid installation the page appears with errors (example: the links on the top (Demo, Doumentaion, Download appears >Demo, >Documentation, Download) and when I clicked on Demo the browser tell me page Forbidden and the link generated is
"http://localhost/grid/<?=site_url("

What I'm doing wrong??

Please help!

THX in advance
#69

[eluser]aibanez[/eluser]
I think I found the error, in the view file (flexigrid.php) many times are code like this:
<link href="<?=$this->config->item('base_url');?>public/css/style.css" rel="stylesheet" type="text/css" />
My server is interpreting the php code after the href="<? as it is (text) not like php, i.e. the href does not replace the result of this->config->... etc.
Why is happening this? Anybody can help me.
Thank you in advance. :-S
#70

[eluser]zacklander2007[/eluser]
hi, aibanez i think mybe you try to change delimiter your php from <?= become <?php echo , i hope it help ...




Theme © iAndrew 2016 - Forum software by © MyBB