I have a column in a XtraGrid that shows the time elapsed since the record was inserted. I calculate this on the server and returning the time as a string.
The problem is that its not sorted correctly, Please see image how 9 days is more then 23 days…

Any idea how to make it in a way the sort would work better?
One way to get around this is to store your values in the Database as a int64 as Ticks, therefore you can do sorting on the server side, then on your application side, create TimeSpans from the Ticks and you can handle the CustomColumnDisplayText to display it however you want, ensuring your column is set to sort on Value and not DisplayText.
Example
Within your CustomDisplayText event of your GridView place