Grid sorting KB/MB

I have a column, Size, that will have file sizes expressed like this: 8KB, 2KB, 2,048KB, 10MB, etc.

Sorting does not work with int or str. Is there a “smart” sorting routine that recognizes commas, KB is smaller than MB, GB is bigger that MB, etc…?

  1. You can implement custom sorting function
    docs.dhtmlx.com/doku.php?id=dhtmlxgrid:sorting&s[]=custom&s[]=sorting#custom_sorting
  2. You can implemen t custom eXcell type, change getValue() method of the cell so it will return integer value and int sorting will work as expected
    docs.dhtmlx.com/doku.php?id=dhtm … creation&s[]=custom&s[]=excell