I am adding a dynamic column and also setting the sortcomparer for that column.
I have two tabs in my datagrid. The first tab has static columns and the second tab has dynamic columns that I have described above.
When I click on the second tab for the first time the dynamic column is created and I can see the data populated correctly but not sorted according to the sortcomparer because I can see while debugging that it is not getting fired at all.
But when I go to my first tab and then again come back to my second tab the sortcomparer is getting called and sort works perfectly from then on.
What am I missing? Why is sort not working for the first time when the dynamic column is created and populated?