I’m having a problem sorting number column using PagedView.
var dataset = new Spry.Data.XMLDataSet(null, ‘/Items/Item’);
dataset.setColumnType(‘price’, ‘number’); // dataset is
loaded with items using Ajax request later on…
var view = new Spry.Data.PagedView(dataset);
Here is the HTML (partial):
<div spry:region=”view dataset”>
<td spry:sort=”itemName”>Item Name</td>
When I click on “price” column, it is sorted as “string”
instead of “number”. I would like to sort it as number. The column
type for “price” is set to number. Is there a workaround for this?
I think you need to set the column type on the paged dataset.
Oops, thanks for letting me know. Didn’t notice that the
PagedView had a method to set its column type….
- PagedView state problem
- How to add additional data to an existing dataset
- Can you specify spry:region to call a dataset dynamically?
- Selected row on a spry table
- Column widths in Spry dataset display
Related posts brought to you by Yet Another Related Posts Plugin.