Actipro ThemedDataGrid throws exception after scrolling to new row line

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 6 years ago by Anna Domachowska
Version: 14.2.0610
Platform: .NET 4.5
Environment: Windows 8 (64-bit)


I keep getting this exception after scrolling to new row line in gridview:

at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.StartAt(GeneratorPosition position, GeneratorDirection direction, Boolean allowStartAtRealizedItem)
at System.Windows.Controls.VirtualizingStackPanel.MeasureOverrideImpl(Size constraint, Nullable'1& lastPageSafeOffset, List'1& previouslyMeasuredOffsets, Boolean remeasure)
at System.Windows.Controls.VirtualizingStackPanel.MeasureOverride(Size constraint)
at System.Windows.Controls.Primitives.DataGridRowsPresenter.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)


at System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)

at DNVS.Nauticus.Hull.App.Main()

The scenario is as follows:

- create a WPF grid having NewRowTemplateBehavior.Template set up and a fixed height.

- fill in the grid with number of items exceeding one page

- scroll the grid the way that new item placeholder row disappears from the grid but pressing "PageUP/Down" would make it visible.

- press "PageDown" and see that the exception is raised

This issue happens only when I set NewRowTemplateBehavior.Template to non-empty value (ie. <TextBlock>New row</TextBlock>) 


Version of DataGrid.Contrib.Wpf I'm using is 14.1.600.0. The issue can be replicated also within ActiPro WPF demos for version 14.1.600.0.

I'm hoping for some help from your side how to workaround this problem.


Many thanks,


Comments (2)

Answer - Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Anna,

Another customer reported this to us this past week too and we have made a change that should fix it for the next version.

If you need to fix it right now, please go to our repo and download that.  Open the DataGrid.Contrib project and in NewRowTemplateBehavior.OnDataGridLoadingRow, remove the UpdateLayout() call.  That will do the trick.

Actipro Software Support

Posted 6 years ago by Anna Domachowska

Many thanks, I'll try editing the DataGrid code. One day we'll surely upgrade.


The latest build of this product (v2020.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.