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
No, thank you.
I used your solution to clear them just before I change the DataTable and it works perfectly!
Hello Lucasz,
Just checking in, do you have any other questions or concerns on this matter?
Sincerely,AndrewDeveloper Support IInfragistics Inc.www.infragistics.com/support
Hello Lukasz,
One way to force FieldLayoutInitialized to fire each time would be to clear the FieldLayouts before you change the DataTable for example:
myGrid.FieldLayouts.Clear();
Please let me know if you have any questions.
Sincerely,
Valerie
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support