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

[eluser]RS71[/eluser]
[quote author="mosos" date="1228254188"][quote author="RS71" date="1228179056"]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.[/quote]

quick fix:

controller\ajax.php line 39

Code:
//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":[]}');
[/quote]

Very nice! Thank you Mosos.
#42

[eluser]vicman[/eluser]
greath job.

thanks Smile
#43

[eluser]mosos[/eluser]
use this library with multiple database connection and found that build_query function is hardcoded to use default db connection. how to fix this ?
#44

[eluser]Eric Dykstra[/eluser]
[quote author="RS71" date="1228270422"][quote author="mosos" date="1228254188"][quote author="RS71" date="1228179056"]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.[/quote]

quick fix:

controller\ajax.php line 39

Code:
//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":[]}');
[/quote]

Very nice! Thank you Mosos.[/quote]

I have the same issue - but the 'quick fix' made no difference. Something I've done wrong?
#45

[eluser]Eric Dykstra[/eluser]
[quote author="Eric Dykstra" date="1232155676"][quote author="RS71" date="1228270422"][quote author="mosos" date="1228254188"][quote author="RS71" date="1228179056"]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.[/quote]

quick fix:

controller\ajax.php line 39

Code:
//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":[]}');
[/quote]

Very nice! Thank you Mosos.[/quote]

I have the same issue - but the 'quick fix' made no difference. Something I've done wrong?[/quote]

I should add ... I used the Console in FireBug to find this:

<h4>A PHP Error was encountered</h4>

<p>Severity: Notice</p>
<p>Message: Undefined property: Ajax_model::$db</p>
<p>Filename: models/ajax_model.php</p>
<p>Line Number: 31</p>

</div><br />
<b>Fatal error</b>: Call to a member function select() on a non-object in <b>/var/www/domain_name_removed/html
/system/flexigrid/models/ajax_model.php</b> on line <b>31</b><br />

From that it appears the 'db' object has not been instantiated but this is an example code set, so I am sure it has.

Ideas?

Thanks in advance.

Eric
#46

[eluser]Eric Dykstra[/eluser]
[quote author="Eric Dykstra" date="1232163966"][quote author="Eric Dykstra" date="1232155676"][quote author="RS71" date="1228270422"][quote author="mosos" date="1228254188"][quote author="RS71" date="1228179056"]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.[/quote]

quick fix:

controller\ajax.php line 39

Code:
//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":[]}');
[/quote]

Very nice! Thank you Mosos.[/quote]

I have the same issue - but the 'quick fix' made no difference. Something I've done wrong?[/quote]

I should add ... I used the Console in FireBug to find this:

<h4>A PHP Error was encountered</h4>

<p>Severity: Notice</p>
<p>Message: Undefined property: Ajax_model::$db</p>
<p>Filename: models/ajax_model.php</p>
<p>Line Number: 31</p>

</div><br />
<b>Fatal error</b>: Call to a member function select() on a non-object in <b>/var/www/domain_name_removed/html
/system/flexigrid/models/ajax_model.php</b> on line <b>31</b><br />

From that it appears the 'db' object has not been instantiated but this is an example code set, so I am sure it has.

Ideas?

Thanks in advance.

Eric[/quote]

ARGH! Silly mistake on my part. I thought the database library was loaded - it wasn't! So, I simply added it to the autoload.php file and everything worked like a charm!

Sorry for wasting everyone's time - but at least it is here for someone else - so they can avoid the same mistake.

Thanks,

Eric
#47

[eluser]Unknown[/eluser]
Hello guys,
I am a beginner in programming in general and very new especially in PHP programming.
With the great documentation en tutorials I managed to implement the Flexigrid in an application (using apache, mysql, php with CI).
But I do have a prob I can't solve. I'm trying to concat two fields of a table into the flexigrid, but I get a database error (1064).
My sql code looks like this;
$this->db->select ('personen.volgnr,
CONCAT( personen.naam, ' ', personen.voornaam ) as naam,
straten.omschrijving as straat,
personen.huisnr,
personen.woonplaats,
districten.omschrijving as district,
personen.huistelefoon,
personen.werktelefoon,
personen.mobiel,
personen.emailadres
from personen
LEFT OUTER JOIN straten
ON personen.straat = straten.volgnr
LEFT OUTER JOIN districten
ON personen.district = districten.volgnr' ) ;
This code works fine at command prompt, but I can't get it to work on the grid.
Can anyone tell me what I'm doing wrong here??

Thanks in advance.
PS: my ajax file and controller file correspond with the ("concatted") columns in the model file and I also tried escape characters like \' \' and also \" \". Nothing helps....
#48

[eluser]seocoder[/eluser]
Sorry, I was wrong)
#49

[eluser]Nicolas400[/eluser]
Just wondering.
Is any way to load FK values ?
Or the idea is to create and use a View ?

Best regards. Nicolas
#50

[eluser]monpire[/eluser]
Hi, thanks for such a tool.

I am having some problem implementing even with the example. No matter what I tried, it just sits there and won't load the records.

To see this: Flexigrid Test

I have set the libraries to autoload database, nothing seemed to help. Although in FireBug console there seems to be no query passing.

Thank you in advance




Theme © iAndrew 2016 - Forum software by © MyBB