Search code examples
c#asp.net-coredevexpressblazorblazor-server-side

DevExpress BlazorServer DataGrid LayoutChanged Event doesn't fire after refresh


the problem: when a user refreshes the page and then changes the layout of the data-grid there's no LayoutChanged event. Before a refresh the event fires just fine.

the suspect: in my razor component is a if-condition around the whole html which checks if the base-component is initialized because the LayoutRestoring event fires when the grid initializes but i need some data the base-component handles. When I remove the if-condition the LayoutChanged event fires just fine even after a refresh.

why I do it that way: balzor renders a component before doing the first await in the OnInitializedAsync method and after the OnInitializedAsync method is finished. When the data-grid is initialized the LayoutRestoring event is fired but for loading the right layout I need some information that the base-component handles. I can't move the functionality from the base-component into my component and the user should not press a button to save the current layout.


Solution

  • This was a bug in the code from DevExpress. supportcenter.devexpress.com/versionhistory