I am using a flexgrid in a Win 8 phone app to display data tables that may have different numbers of columns. I can populate the flexgrid with no trouble by first creating the needed columns and then adding rows and populating their cells as I go. This works fine for displaying the data.
Now I would like to be able to sort the data by tapping a column header. And I believe to do that I need to have a List and use that as the ItemsSource for the flexgrid. In particular, the source would be a List of Lists, where each interior List is the DataItem for a row.
I can create the List of Lists and verify that it contains all the needed data, and if I set it as the ItemsSource for the flexgrid, I can verify that the flexgrid has the correct number of rows and columns–but no data is displayed in the cells of the flexgrid.
From searching the web, it seems that I need to somehow use the CellFactory, but I have not been able to figure out how to accomplish that.
Help would be appreciated. Thanks.