I am displaying a grid using a collection of objects whose Type was generated at runtime. The grid has some Templated columns so I need to supply a ModelType attribute for the grid. The objects implement a statically defined interface. I have tried using an object that is typed as the Interface and an Object but I get a "System.InvalidCastException: Object must implement IConvertible." error.
Is there a workaround for this issue? Would it be possible for ModelType to accept an actual Type instead of an object? Or perhaps the Template context can be derived from the TValue property. It seems that ModelType and TValue are somewhat redundant.
Any help would be greatly appreciated.
Thanks!
Jeff