Hello,
My application uses the grid component to display data with a variable number of columns.
To do this, I use a class that inherits from DynamicObject, as explained in the documentation. Everything works correctly when my class inherits directly from DynamicObject.
There are, however, several different grids to display. To optimize the management of variable columns, I inherited two classes from a base class which itself inherits from DynmaicObject:
But if I use one of these classes, the grid stops working and the following error appears during validation after editing:
Unable to cast object 'TeamCashbox.Models.AccountingDocument' to type 'Sytsem.Dynamic.ExpandoObject'
Here is a screenshot of the exception:
Do you think it is possible to use a child class of DynamicObject in the grid control?