My application uses a listcontrol, in grid view/report view. Certain application settings around 600+ are stored in Config.NET and when the application loads config.Net is queried and the list view is filled with the items.
But everytime the list is queried and listview ctrl being filled takes time, the UI kind of freezes for some time. Is there a way where i could cache the items and t开发者_如何学JAVAhe list view just fills its using the cached data...
there are 2 problems
1- UI Freezes while loading lot of data.
2- How to cache data if dataset is too large.
UI Freezes while loading lot of data.
For this , you can use BackgroundWorker Component if using .net 2.0 or higher.
See here
How to cache data if dataset is too large.
For this , you can load the data in a Dictionary when your application starts and use WeakReference class to store this dictionary.
See here
精彩评论