Home Forums WPF controls Xceed DataGrid for WPF Looking for an event …

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #23899 |

    There seems to be quite a time lag between setting the ItemSource of the grid and when the grid actually displays the data (about 100 records). Is there an event that fires when this “refresh” is done? I’m trying to show the wait cursor until the grid displays the new data.

    Imported from legacy forums. Posted by Lori (had 528 views)

    User (Old forums)
    Member
    Post count: 23064

    I wonder if the standard FrameworkElement SourceUpdated event could work for you?

    If it does please let us know.

    Additionally you could consider doing a load using the BackgroundWorker. Checkout the Chapter 3 source download for the Apress Pro WPF book by Matthew MacDonald for some examples of using BackgroundWorker.

    FrameworkElement.SourceUpdated event (* Note: I’ve never tried this):

    DataGridCongrol m_dataGrid = ….

    m_dataGrid.SourceUpdated +=
    new EventHandler<DataTransferEventArgs>(DataGrid_SourceUpdated);

    void DataGrid_SourceUpdated(object sender, DataTransferEventArgs e)
    {
    if (e.Property == DataGridControl.ItemsSourceProperty)
    {
    }
    }

    Imported from legacy forums. Posted by Richard (had 261 views)

    User (Old forums)
    Member
    Post count: 23064

    I wound up hooking the LayoutUpdated event for the grid. I’m sure that it wil execute my code more often than I’d like, but I’m not doing much processing so there shouldn’t be much of an impact.

    Thanks for your assistance!

    Imported from legacy forums. Posted by Lori (had 3340 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.