Note that there are some explanatory texts on larger screens.

plurals
  1. POProgress bar during load of virtualised wpf datagrid
    primarykey
    data
    text
    <p>I am using the normal WPF DataGrid to display some data from a REST feed. The REST feed is paged with a next link that contains the URL for the next set of items. The DataGrid is virtualised by having a custom object that implements the IList interface (not IList), and knows how to fetch missing data from the REST feed.</p> <p>The issue is that if a user scrolls immediately to the bottom this component must do a bunch of REST requests for each "next" page, causing the GUI to freeze. Of course I could simply put up a "wait" screen, but I would actually be able to show an accurate progress bar.</p> <p>So to accomplish this I have a progress bar on my application status bar that has visibility set to IsLoading on the data context, which in turn passes this down to the paging object. There is another property LoadedPercentage which shows how much of the required data has been loaded.</p> <p>The issue is that when I scroll to the end of the screen, it still freezes and shows nothing. I set breakpoints in the code to see if my properties were being accessed and they were all hit at the correct times and showed the correct values. So I deduce from this that the DataGrid itself is somehow stopping the GUI thread from doing any drawing while it waits for the IList object to return the requested object.</p> <p><strong>So does anyone know of a solution for getting the status bar to show up?</strong> I would really rather have the status bar appear and track progress rather than some "loading please wait" screen. <strong>Can this be done at all with the built in objects or do we have to purchase some third party grid?</strong></p> <p>EDIT: It wasn't completely clear to some so I wanted to mention: I am doing virtualisation as described <a href="http://www.codeproject.com/Articles/34405/WPF-Data-Virtualization" rel="nofollow">here</a> among other places. It seems that when the DataGrid requests a specific entry it blocks the entire UI painting until it the request completes.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload