Patch: sorting a flexigrid built from static HTML

71 views
Skip to first unread message

Nick

unread,
Aug 31, 2009, 7:16:00 PM8/31/09
to Flexigrid for jQuery
Far as I can tell, sorting only works when your flexigrid is ajax'd up
to a server-side data source. I wanted to be able to sort a grid
built from a static HTML table. Here is a patch that adds this
functionality to the current trunk revision (r3). I didn't create a
patch for the current release version, which is slightly different,
because your svn repo has no branches or tags from which to create
such a patch, and I'm apparently too lazy to figure out if it's r1 or
r2. But to apply these changes to the current release version
("1.0b3") is pretty simple, since I only made 3 changes:

1. add "sortorder: 'asc'" to the default properties struct up at the
top
2. add the "else if (!p.url) this.inPlaceSort();" clause to the end of
the changeSort method
3. copy in the inPlaceSort() function

I guess I can't attach the patch directly to this Google group, so am
publishing it here:

http://pixelnix.com/wp-content/uploads/flexigrid-sort-in-place.diff

harryhobbes

unread,
Sep 28, 2009, 12:55:52 AM9/28/09
to Flexigrid for jQuery
I've tried this, but it's hasn't changed anything. I don't see the
little up/down icon appear when I hover over the column header and
nothing happens when I click it.
Am I meant to enable sorting somewhere?
Reply all
Reply to author
Forward
0 new messages