Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Custom sorting with ListGrid

    Hi,
    I have a ListGrid attached to a DataSource that has a lot of DataSourceTextFields, e.g.:
    DataSourceTextField sizeFile = new DataSourceTextField("FileSize", "File size", SIZE_FIELD_LEN, true);

    The reason I use the String type for the field is that I also want to display the unit of the file size, as well as some strings like "unknown"...
    However, when I sort this column in the ListGrid, it gets sorted alphabetical according to the string. Is there a way I can pass numbers and force the sorting to be according to those numbers or sth similar?

    Thanks

    #2
    ah solved - I think;)
    I found an example in the showcase where a filter is added...
    So I have to pass the raw numbers to the list grid but then modify the displayed values...

    Comment

    Working...
    X