Sorting on button cell value in table view


I’ve got a table view containing a Button Cell element on which I want the data to be sorted (checked rows first). But, it does not work: sorting gives me the rows in a more-or-less random order. Have I done something wrong or is it just not possible?

BTW. sorting on all other column works OK.