0

According to the msdn suggestion I set

  <Setter Property="EnableRowVirtualization" Value="True"/>
        <Setter Property="EnableColumnVirtualization" Value="True"/>

But I recognized that if i set EnableColumnVirtualization as true, When I scroll to the horizontally , it causes selected item to be changed and it trigers it. I was 2 panels updating each other with MvvmLight.Messaging when selected item was triggered. And scrolling horizontally became painful while every time I scroll, it triggers selecteditem change and pops up error messages as below.

System.NotSupportedException: A second operation started on this context before a previous asynchronous operation completed. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context. Any instance members are not guaranteed to be thread safe.
at System.Data.Entity.Internal.ThrowingMonitor.Enter()
at System.Data.Entity.Core.Objects.ObjectQuery`1.<GetResultsAsync>d__e.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Data.Entity.Internal.LazyAsyncEnumerator`1.<FirstMoveNextAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Data.Entity.Infrastructure.IDbAsyncEnumerableExtensions.<FirstOrDefaultAsync>d__25`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
**at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Identity.AsyncHelper.RunSync[TResult](Func`1 func)

when I set the Virtualization false, everything is smooth. So I would like to know, is this the case, I cant use virtualization or if there is a workaround for this?

svick
  • 214,528
  • 47
  • 357
  • 477
Emil
  • 5,290
  • 6
  • 47
  • 87
  • Is there any real need for virtualization? How many items are you trying to display? I personally have never been in the situation where virtualization becomes necessary. – Mike Eason Nov 25 '15 at 12:33
  • it is like 17k rows and 30 columns. I thought that virtualization makes scrolling easier for that much data – Emil Nov 25 '15 at 13:36

0 Answers0