custom sort function not working with mRender
custom sort function not working with mRender
Hi there,
I'm using a custom afnSortData function to provide sorting values for a column in my table. The column contains numeric data, but also a colour-coding span to indicate information to the user, so I need to strip this out for the numeric sorting to work properly.
If I do this with static content in the cells, it works, you can see it here: http://jsfiddle.net/G2MPR/1/
However, when I instead populate the table with data using fnAddData to get the data out of a javascript array, it doesn't work. My custom function runs and returns the same (correct) data to sort on as before, but the sorting doesn't actually happen. You can see this behaviour here: http://jsfiddle.net/cHtNs/5/
Can anyone tell me what the problem is when I'm populating the data from an array please?
Thanks,
Sarah
I'm using a custom afnSortData function to provide sorting values for a column in my table. The column contains numeric data, but also a colour-coding span to indicate information to the user, so I need to strip this out for the numeric sorting to work properly.
If I do this with static content in the cells, it works, you can see it here: http://jsfiddle.net/G2MPR/1/
However, when I instead populate the table with data using fnAddData to get the data out of a javascript array, it doesn't work. My custom function runs and returns the same (correct) data to sort on as before, but the sorting doesn't actually happen. You can see this behaviour here: http://jsfiddle.net/cHtNs/5/
Can anyone tell me what the problem is when I'm populating the data from an array please?
Thanks,
Sarah
This discussion has been closed.
Replies