Sorting one column based on other column (byte size vs. human readable size)
Sorting one column based on other column (byte size vs. human readable size)
Hello,
I would like to sort the output of one column based on another (hidden) column.
I have a column (Size) that contains human readable file sizes (2.3 MB, 1.2 GB, etc.)
When a user sorts this column 2.3MB appears above 1.2GB (based on numerical sorting)
This behavior is not what I want, obviously, instead I would like to sort based on another column that simply contains the number of bytes.
Is there any way to do this?
Thanks :)
I would like to sort the output of one column based on another (hidden) column.
I have a column (Size) that contains human readable file sizes (2.3 MB, 1.2 GB, etc.)
When a user sorts this column 2.3MB appears above 1.2GB (based on numerical sorting)
This behavior is not what I want, obviously, instead I would like to sort based on another column that simply contains the number of bytes.
Is there any way to do this?
Thanks :)
This discussion has been closed.
Replies
Allan
However, I'm having trouble getting it to actually work.
I've pasted the plugin code and set sType in aoColumns, but now it's not sorting the column at all. Not Sure what I could be doing wrong :-/
Perhaps the plugin doesn't support KB as a size?