I'm trying to use the VirtualGrid to show a collection of read-only "record" objects in a report. The problem is that each "record" is just a List<object> whose count and types are not know until runtime. The column titles are stored separately in a different list of field descriptors.
I tried the CellValueNeeded approach (i.e. without using any sort of DataSource, custom or otherwise), and while my data showed up just fine in the grid, I had no titles on the columns. There doesn't seem to be any way to set the titles with this approach that I can see. There is no corresponding ColumnTitleNeeded event, no SetColumnTitle function and no collection of columns I can access. At least not that I can see
So how do I set the column titles in code behind?
(I should add that I also tried the Custom DataSource approach I looked at your VirtualGrid_WPF example in the SDK, but that seems to rely on the fact that each object representing a record ("Club" in the example) has property names and types that areknown at build time. I could not make it work at all. )