I have a column in a data grid that has the values of “Monday”, “Tuesday” etc, as varchars, and I wanted to know, how do i sort the column to be in the correct order. Doing a normal sort doesnt work obviously, as the days are not alphabetically ordered naturally (Wed after Thurs). I am assuming some sort of itemrenderer, but anyone got a snippet of code to illustrate how this would work?
Thanks
As far as I know there is nothing built-in either to sort days of the week or get a day number from a day of the week, so you need to build both. You don’t need a custom itemRenderer to do sorting though, just a sort compare function.