I have situation in a hierarchical listbox where i am using alternating background colors for the top level items, but when I expand a row I want the child rows to take the color of the parent so simply doing Row Mod 2 in cellBackgroundpaint does not cut it…
It is easy to do if the list is not sortable(Assign row color to rowtag of top-level items… But that breaks down if one allows sorting by column (which I need to do). I am pretty sure I solved this is the past but I don’t remember how and can’t find the code.
The obvious thing would be to reassign the row colors after a sort…but how to tell the sorting is finished? The best thing I could think of is fire a timer with a period of 1 that gets reset in CompareRows so the action event does not fire until sorting is complete… but that would fire for non visible rows sop potentially lot of unneeded overheard.
Any other way to do this? I wish there was a SortEnd event!