开发者

How to enforce visualisation of controls in datagrid

开发者 https://www.devze.com 2023-04-13 05:51 出处:网络
I have datagrid that contains plenty of DataGridTemplateColumn columns. When I move the scrollbar it creates requests to load data to the controls as they become v开发者_如何学运维isible. This slows d

I have datagrid that contains plenty of DataGridTemplateColumn columns. When I move the scrollbar it creates requests to load data to the controls as they become v开发者_如何学运维isible. This slows down the interface significantly. Is it possible to disable this feature so all controls are propagated in the constructor (like in good old winform applications)?


There are many options you can explore to improve this performance...

The data fetching code that gets fired when data grid template column cells become visible, can be done on another thread and then the notifications should be dispatched to the UI thread.

A quick fix could be to use deferred scrolling.

One more way could be to use DataGridTemplateColumn.CellTemplate and CellEditTemplate, where CellTemplate can be a simple lightweight view and CellEditTemplate to hold the complex view (that makes heavy data fetching calls) in its edit mode.

Do any of these help?

0

精彩评论

暂无评论...
验证码 换一张
取 消