ContextSwitchDeadlock when loading WPF RadGridControl via VirtualQueryableCollectionView

Thread is closed for posting
2 posts, 0 answers
  1. Paul Schwartzberg
    Paul Schwartzberg avatar
    4 posts
    Member since:
    Feb 2006

    Posted 06 Oct 2016 Link to this post


    I am getting the ContextSwitchDeadlock excepion when loading WPF RadGridControl with 100 000 rows via VirtualQueryableCollectionView using OData v4.


    I googled this.  I know the popular solution is to doesnt help to go to ctrl-Alt-E in VS, the exception settings window, and under Managed Debugging Assistants to uncheck/deactivate the ContextSwitchDeadlock option. 

    This doesnt prevent the exception it just means, it just means execution will continue, and the debugging session will not be interupted. 

    I am including a demo at this link:    .   When i run it with 100 000 in the table (just use the Inserting10000Customers.sql file in the root of the demo to load the table), it never comes back after this line nr 3 in the code below (from the demo).    The program just runs for minutes maybe hours.  Stuck at this line.    If my exceptions settings has ContextSwitchDeadlock activated it throws her the   ContextSwitchDeadLock exception.  

    Any ideas how to get the demo to work with 100 000 rows






    01.public partial class MainWindow
    02.    {
    03.        private static readonly Container Container = new Container(new Uri("http://localhost:21026/")); //http://localhost:21026/
    04.        public DataServiceCollection<CustomerDto> Customers = new DataServiceCollection<CustomerDto>(Container.Customers.IncludeTotalCount());
    05.        public MainWindow()
    06.        {
    07.            InitializeComponent();
    10.            IQueryable<CustomerDto> test = Customers.OrderBy(o => o.Name).AsQueryable();
    11.            var source = new VirtualQueryableCollectionView(test) { LoadSize = 1000 };
    13.           // source.ItemsLoading += Source_ItemsLoading;
    15.            DataContext = source;
    17.        }

  2. Paul Schwartzberg
    Paul Schwartzberg avatar
    4 posts
    Member since:
    Feb 2006

    Posted 06 Oct 2016 Link to this post

    The telerik & OData v4 solution (2 projects) for VS 2015, demo link, that i refered to above,  is at this link:


Back to Top