Hi Patrick,

with Flexigrid, filtering is already possible!
Using the following options, you can filter the initial data that is
displayed.

$("#flex1").flexigrid
                        (
                        {
                        url: 'post2.php',
                        dataType: 'json',
                        query: 'Dublin',
                        qtype: 'city',
                        colModel : [
                                {display: 'ID', name: 'id' width : 20, sortable 
: false, align:
'center'},
                                {display: 'City name', name : 'city', width : 
200, sortable :
true, align: 'left'}
                                ],
                        sortname: "city",
                        sortorder: "desc",
                        usepager: true,
                        resizable:false,
                        title: 'Cities',
                        useRp: true,
                        rp: 10,
                        showTableToggleBtn: false,
                        width: 500,
                        height: 400
                        }
                        );

The 'query' and 'qtype' options do the trick!  And with this filtered
data, you can still page through your ajax'd data!

Kevin



On May 6, 10:13 pm, patrick davey <[EMAIL PROTECTED]> wrote:
> Hi Kevin,
>
> That looks like a really excellent plugin - might have to give it a
> try.  The one thing it doesn't do that I need it to - is *filtering*.
> That is, say I am returning rows and one of the columns is a city -
> and there may be multiple rows with the same city data.  I want to be
> able to choose 'Dublin' and then only have rows which have dublin as a
> city returned.
>
> And then... I want to be able to continue sorting and paging through
> my ajax'd data!  Fun eh ;)  When I get something working I'll try to
> post it up somewhere... as long as I can make it readable etc!
>
> Thanks,
> Patrick
>
> On May 6, 9:47 pm, Kevin Kietel <[EMAIL PROTECTED]> wrote:
>
> > Try Flexigrid!
>
> >http://webplicity.net/flexigrid/
>
> > This jQuery plugin is a Lightweight but rich data grid with resizable
> > columns and a scrolling data to match the headers, plus an ability to
> > connect to an json/xml based data source using Ajax to load the
> > content.
>
> > If you need any help implementing it, just contact me or take a look
> > at the Flexigrid discussion on CodeIgniter 
> > forums:http://codeigniter.com/forums/viewthread/75326/
> > There are several examples that you can use.
>
> > Let me know if this is what you're looking for!
>
> > Bye,
>
> > Kevin
>
> > On May 6, 2:18 am, patrick davey <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > I am using the tablesorter pluginghttp://tablesorter.com/andit
> > > works fine for smallish tables.  However, I need to page through large
> > > result sets (and filter them) - so I am going to use AJAX to
> > > repopulate the table once the options have been selected.
>
> > > Now, if through filtering / whetever - less than 100 rows are
> > > returned, then I want tablesorter to just sort the table (without
> > > having to make an AJAX call)
>
> > > To do this I want to edit the tablesorter plugin to call a function
> > > which returns true/false depending on how many records there are to
> > > sort.
>
> > > So my question (there is one!) is how do I do that with tablesorter.
> > > I have tried using 'sortStart' and returning false but no joy.  I can
> > > edit the source of course - but if there is a simple way I'd love to
> > > know it.
>
> > > Better still, does anyone have an example of doing filtering&sorting&
> > > paging of large datasets using  JSON/AJAX and Jquery? :)
>
> > > Thanks,
> > > Patrick

Reply via email to