Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
235
Interesting XamDataGrid Problem
posted

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?