Sunny
Sunny

Reputation: 3295

Cannot change or check the contents or Current position of CollectionView while Refresh is being deferred

I am trying to open popup window using windows.ShowDialog(), but on this line during execution following exception coming. I tried many solutions which are available on Stack Overflow but they didn't work.

at System.Windows.Controls.ItemCollection.VerifyRefreshNotDeferred()
   at System.Windows.Controls.ItemCollection.get_Count()
   at Xceed.Wpf.DataGrid.Automation.DataGridContextAutomationPeer.GetChildrenCore()
   at Xceed.Wpf.DataGrid.Automation.DataGridControlAutomationPeer.GetChildrenCore()
   at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateChildrenInternal(Int32 invalidateLimit)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateChildren()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.ContextLayoutManager.fireAutomationEvents()
   at System.Windows.ContextLayoutManager.UpdateLayout()

In output window: enter image description here

What am I missing here?

Upvotes: 0

Views: 34

Answers (0)

Related Questions