Closed sparedevone closed 2 years ago
@sparedevone That's a general WPF issue, what do you think DGX could do about this?
Currently I'm not able to provide an alternative approach. DGX should be loaded the templates only one time or still remember that it was done before in order to just load the dataset only when filter the criteria was change. Or there is another way to place the FilterControl.
I don't think this is something that could be solved by DGX - you would need to write another TabControl that does not reload the content when changing tabs.
It will be good to improve current behavior of header template creation. In case of switching tabs in DataGridExtensionsSample always calls OnApplyTemplate when a custom filter column was assign, e.g.
dgx:DataGridFilterColumn.Template="{StaticResource MultipleChoiceFilter}"
In case a few rows in DataGrid it will not notice, but in a scenario of more then 1000 rows and a defined filter criteria
OnApplyTemplate
will be called for each custom filter column and this triggersCreatePredicate
finally.This delays switching tabs unusually long, even though no filter criteria was changed.