There seems to be a problem with field layout assignment. One FieldLayout is made with fields A, B, C, that corresponds to an object with properties A, B, and C. This particular object is a generic type, let's say Entry<T>. Initially, when you set the datasource to List<Entry<T>>, it will find the field layout and assign it automatically based on the properties the generic item has. However, if I reset the datasource and assign it a List<Entry<S>>, it will not find that same FieldLayout, it will instead generate a new FieldLayout with the exact same properties, A, B, and C, even though one already exists.
This was very weird behavior for me, and I spent some time wondering where my own code went wrong in adding/removing appropriate field layouts.
This is not the correct behavior, right?
Hi,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
I worked around the problem by overriding the AssigningFieldLayoutToItem event and manually assigning the field layouts.
Edit: Oops, I forgot to mention that 1) The latest service release does not fix this problem (although it did cite some fixes to DataPresenter customizations with dynamically generated data), and 2) I am creating and destroying unbound fields on one of the 2 field layouts that exhibit this problem.