I've done some searching, but I didn't see this issue anywhere. Please forgive me if I'm duplicating. There are two issues but they appear related.
Issue #1
I have a RadOutlookBar that is bound to a list of items. Each of the items contains a list which is bound to a grid. The grid is in a template that defines the RadOutlookBar's content. Everything binds fine, but when I select a different RadOutlookBarItem, the grid refreshes, and will throw an exception:
In this case, it only happens for one field, and only if I specify the DataFormatString.
As you can see, this field is DateTime type. If I step through the exceptions, the field will load properly.
Issue #2
This issue is very similar to the above. We have a RadTabControl that is bound to a list. The list items also contain lists which are bound to a template that contains a grid. In this case, the items are different types and so the grids themselves are defined in different DataTemplates targeting their specific DataTypes. Initially, everything loads just fine, but when you select a different tab, an exception with the same message as issue #1 will be thrown for each column that was defined in the originally selected tab. This time though, the type is the type of item listed in the newly selected tab's grid.
Again, after stepping through the exceptions, the grid loads just fine.
One tip for reproducing the exceptions if they are not being caught (the code is just throwing exceptions away):
Go to Debug -> Exceptions..
Tick the "Thrown" checkbox next to "Common Language Runtime Exceptions".
Issue #1
I have a RadOutlookBar that is bound to a list of items. Each of the items contains a list which is bound to a grid. The grid is in a template that defines the RadOutlookBar's content. Everything binds fine, but when I select a different RadOutlookBarItem, the grid refreshes, and will throw an exception:
Invalid property or field - '[FieldName]' for type: Object |
In this case, it only happens for one field, and only if I specify the DataFormatString.
DataFormatString="{}{0:dd/MM/yyyy}" |
As you can see, this field is DateTime type. If I step through the exceptions, the field will load properly.
Issue #2
This issue is very similar to the above. We have a RadTabControl that is bound to a list. The list items also contain lists which are bound to a template that contains a grid. In this case, the items are different types and so the grids themselves are defined in different DataTemplates targeting their specific DataTypes. Initially, everything loads just fine, but when you select a different tab, an exception with the same message as issue #1 will be thrown for each column that was defined in the originally selected tab. This time though, the type is the type of item listed in the newly selected tab's grid.
Invalid property or field - '[FieldName from previous]' for type: [Row data type for selected] |
Again, after stepping through the exceptions, the grid loads just fine.
One tip for reproducing the exceptions if they are not being caught (the code is just throwing exceptions away):
Go to Debug -> Exceptions..
Tick the "Thrown" checkbox next to "Common Language Runtime Exceptions".