Sorting problem after setting sType
Sorting problem after setting sType
Hi,
I have two columns, sales (number of sales) and sales value ($ value of sales, no currency symbol). Both columns will contain blanks for products with no sales.
Leaving sorting as defaults, the sales value column sorts alphabetically (99.99 > 124.00), but setting the column's sType to "numeric" partially turns off sorting altogether:
If I click on the Sales Value column, the sort image changes from asc to desc and back again OK, but the data does not sort.
If I then click on the Sales column, which has no sType, then the sort occurs.
If I now go back and click on Sales Value, I no get a correct sort (with 124.00 > 99.99).
Is there any way I can get the sort on the sales value to work first time?
Note that this is single column sorting, not multi-column.
Thanks
Quentin
I have two columns, sales (number of sales) and sales value ($ value of sales, no currency symbol). Both columns will contain blanks for products with no sales.
Leaving sorting as defaults, the sales value column sorts alphabetically (99.99 > 124.00), but setting the column's sType to "numeric" partially turns off sorting altogether:
If I click on the Sales Value column, the sort image changes from asc to desc and back again OK, but the data does not sort.
If I then click on the Sales column, which has no sType, then the sort occurs.
If I now go back and click on Sales Value, I no get a correct sort (with 124.00 > 99.99).
Is there any way I can get the sort on the sales value to work first time?
Note that this is single column sorting, not multi-column.
Thanks
Quentin
This discussion has been closed.
Replies
It is possible that blank values are treated as strings thinking about it (can't remember off the top of my head). You could try using "-" rather than empty values and see if it is then picked up as a numeric column. If so, then a small change or a plug-in sorting function will be needed.
Allan