I'm new to GeoServer so if I miss any information please let me know.
We're running GeoServer v2.2 with FeatureGrid. When a query is run it returns all the rows correctly, but when we try to sort what should be numeric fields by clicking in the column header it does an alpha sort, i.e. in the sales volume column 985 will appear after 9340. The columns are correctly typed in the DB (postgres).
I fired up my trusty javascript console and was able to get a handle to the feature store and when I drill down to an object it looks like this:
data: Object
ABI: "650607021"
ACTUAL_SALES_VOLUME_x1000: "128"
ADDRESS: "PO BOX 105"
CITY: "METAIRIE"
COMPANY_NAME: "OBSCURED FOR PRIVACY"
HEADQUARTERS_OR_BRANCH: "STAND-ALONE"
LATITUDE: "29.975909"
LONGITUDE: "-90.16079"
NAICS: "81112201"
NUMBER_OF_EMPLOYEES: "1-4"
PHONE: "NPA-NXX-NNNN"
SIC: "753602"
STATE: "LA"
ZIP: "70004"
feature: OpenLayers.Feature.Vector.OpenLayers.Class.initialize
fid: "business_data_2012.112788"
state: null
__proto__: Object
id: "OpenLayers_Feature_Vector_348"
store: gxp.data.WFSFeatureStore.Ext.extend.constructor
__proto__: H
So, it appears to me that the feature store is storing the numeric properties as strings. I'm sure there's a simple fix for it, but I can't seem to puzzle it out.