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
1410
Using DataTable and AutoGeneratefields=true, reusing FieldLayout
posted

Hi

We have XamDataGrid that run on top of DataTable (there is AutoGenerateFields set to True).

So, when DataTable changes (columns, rows), the grid is perfectly reloaded.

We have also some custom logic, that uses event FieldLayoutInitialized event.

However, the problem is that, if we load DataTable with the column layout exactly the same as one of the previous layout, the FieldLayoutInitialized event is not fired.

This is propably because those layouts are somehow cached, and grid wants to reuse one of the existing layout.

We would like the FieldLayoutInitialized  event to fire, as we have some logic and styling bound to it.

For example: we are using DataTable column ExtendedProperties to set some logic.

However, updating column ExtendedProperties does not force XamDataGrid to create new Fieldlayout.

Is there a way to achieve the functionality?

Thx in advance for any help