Hi,
I'm using Infragistics 8.3. And I would like do some asynchronously loading of images into a grid.
Right now we are not loading the grid asynchronously, and the performance is pretty bad.
We are loading a grid containing data of persons, and have added an unbound column containing the image for each person.
Are there any way of loading all the bound data as we do now, and then asynchronously loading the images contained in the unbound column? Having the images to appear as they have been loaded? So that the grid is first populated with the bound data, and shown to the user. And then afterwards updated with the images as they are loaded.
Best Regards
Dennis Tycho Nielsen
I don't think that there's any structure built into the grid to do this, beyond using the InitializeRow event; this event was designed for this kind of functionality. What you may want to do is look at the 1 Million Rows sample that ships with the NetAdvantage Samples pack, which demonstrates the LoadOnDemand functionality when using the UltraDataSource. Should you choose not to take this approach, you will still have to be extremely careful when dealing with the loading of data asynchronously, as in .NET you cannot update a UI component outside of the main thread without generally having unpredictable errors and results; this includes simply changing the data on another thread, since the grid will receive notifications from the BindingManager that something has changed and will take action accordingly.
You may find the following 2-part KB article useful as well:
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=9838
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=9839
-Matt