Okay, been working on this all night trying out many things I read about on the net. None of them worked until I tried something out just for fun. You could say I stumbled upon it, but here is the code I have changed for the notes column:
Code: Select all
case COL_NOTES:
if (elem1->notes_.Cmp(elem2->notes_) < 0)
return asc;
else
if (elem1->notes_.Cmp(elem2->notes_) > 0)
return !asc;
break;
At first I was trying with single letters and was quite surprised when they lined up properly. So I dried words, then multy-worded entries. This only seems to work on the Notes column at the moment, so I am thinking of doing an if ...condition1 AND condition2 asc, etc.
At any rate here's a screenshot of how notes works now. We should probably add a line to update the table when someone updates/changes an entry. I noticed that when I entered new words, they weren't sorted properly until I clicked on the column again.