TableWidget will not sort with getStateUsing
Hi all,
I can't seem to sort my data when I am populating it with getStateUsing under a column that isn't in the model, here is my code:
The data is there, and is returning what I am expecting it to return. Even if I try and sort manually using the UI, it is not working. Can someone please help me? Thanks in advance : )
Note, this isn't in my model
3 Replies

Sorting happens at the db level but you are overriding the db results with the getStateUsing() it’s too late in the lifecycle to override correctly.
@Lloyd you would need to transform your table query to get that data BEFORE you put it into the table. Likely with some raw queries, attaching a similar example from one of our projects that may give you some ideas
