CodeIgniter Forums
Some problemes with flexigrid 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: Some problemes with flexigrid implementation (/showthread.php?tid=8492)



Some problemes with flexigrid implementation - El Forum - 05-20-2008

[eluser]Unknown[/eluser]
Hello from Luxembourg,

I need some help with the implementation of flexigrid.

I encontered some problems and can't find suitable solutions.

1 - Some columns won't sort ( processing occurs but never ends )

2 - Setting "sortable : false" seems to have no effect at all ( columns stays sortable )

3 - Quick search don't produce any results ( process occurs but grid show all the records, even one which doesn't match )

I'm not familiar with jQuery, Can someone help me? Thank you.

P.S. : Sorry for my poor english :-S

Code:
$("#Frame").flexigrid
            ({
                        url: 'php/ListeBiens.php',
                        dataType: 'xml',
                    colModel : [
                    {display: 'Ref.', name : 'reference', width : 100, sortable : true, align: 'center'},
                    {display: 'Act.', name : 'actif', width : 20, sortable : false, align: 'center'},
                    {display: 'Phts.', name : 'photos', width : 30, sortable : false, align: 'center'},
                    {display: 'Opération', name : 'operation', width : 65, sortable : false, align: 'center'},
                    {display: 'Type', name : 'type', width : 90, sortable : false, align: 'center'},
                    {display: 'Prix', name : 'numcode', width : 100, sortable : false, align: 'center'},
                    {display: 'Chbrs.', name : 'chambres', width : 40, sortable : false, align: 'center'},
                    {display: 'Surface', name : 'surface', width : 80, sortable : false, align: 'center'},
                    {display: 'Pays', name : 'pays', width : 90, sortable : false, align: 'center'},
                    {display: 'Commune', name : 'commune', width : 180, sortable : false, align: 'center'},
                    {display: 'No.', name : 'numero', width : 20, sortable : false, align: 'center'},
                    {display: 'Rue', name : 'rue', width : 120, sortable : false, align: 'center'}
                    ],
                        buttons : [
                            {name: 'Ajouter', bclass: 'add', onpress : ajoutBien},
                            {separator: true},
                            {name: 'Effacer', bclass: 'delete', onpress : test},
                            {separator: true},
                    {name: 'Modifier', bclass: 'edit', onpress : test},
                            {separator: true},
                    {name: 'Activer/Desactiver', bclass: 'activate', onpress : test},
                            {separator: true}
                            ],
                        searchitems : [
                            {display: 'Ref', name : 'reference', isdefault: true},
                    {display: 'Act.', name : 'actif'},
                    {display: 'Phts.', name : 'photos'},
                    {display: 'Opération', name : 'operation'},
                    {display: 'Type', name : 'type'},
                    {display: 'Prix', name : 'numcode'},
                    {display: 'Chbrs.', name : 'chambres'},
                    {display: 'Surface', name : 'surface'},
                    {display: 'Pays', name : 'pays'},
                    {display: 'Commune', name : 'commune'},
                    {display: 'No.', name : 'numero'},
                    {display: 'Rue', name : 'rue'}
                            ],
                        sortname: "reference",
                        sortorder: "asc",
                        usepager: true,
                        title: 'Liste des biens',
                        useRp: false,
                        rp: 15,
                        showTableToggleBtn: false,
                    resizable: false,
                pagestat: 'Affichage des biens de {from} a {to} sur {total} biens',
                 procmsg: 'Chargement en cours ...',
                nomsg: 'Aucun bien disponnible.',
                        height: 401,
                showToggleBtn: false
                    });



Some problemes with flexigrid implementation - El Forum - 05-22-2008

[eluser]Czarchaic[/eluser]
When, in flexigrid, the processing starts and doesn't stop, it's usually because an error is returned. I went through this problem a few times on the road to getting it right.
The solution is to open Firefox, open Firebug (if you don't have it...get it). Then try to run you flixigrid script again. When it hangs, click the 'console' tab and look at the last item. This will tell you why your script isn't working (including the offending line number). I found that my most common mistake was not naming in the correct db field (name) in the Display portion of the flexigrid setup.


Some problemes with flexigrid implementation - El Forum - 06-10-2008

[eluser]Unknown[/eluser]
try to check your XML, do you se it well if u load it in a browser ?

http://..../php/ListeBiens.php