I'm currently using flexigrid to display data in a current project, but am running into issues with its ability to properly sort certain columns that contain dates or numbers. The data is being sent from a ColdFusion CFC that selects the appropriate data and then delivers it in the proper "json" format. As the date/time stamps and other fields containing numbers are sent as "strings" they do not sort p开发者_如何学JAVAroperly in the data grid.
Is this a limitation of Flexigrid or am I sending the data improperly to Flexigrid? I can provide examples of my code if that is helpful.
Flexigrid doesn't do any sorting at all as far as I remember. It just passes the sorting info to the server. So any issues with sorting data are server-side.
To sort client-side You would have to send all data records instead of n (n per page)
As for selecting and sorting - SQL does not forbid selecting a column twice in a query, so You can
SELECT sth, DATEFORMAT(my_date, sth) as when, my_date ORDER BY my_date;
After selecting data this way You just have to skip my_date
when returning JSON for flexigrid.
精彩评论