RadGridView NullReferenceException

0 Answers 13 Views
GridView
cwider
Top achievements
Rank 1
Iron
cwider asked on 02 Jun 2021, 09:45 AM

Hello to all,

I have a new problem in the latest version of Telerik UI for WPF with the RadGridView control.

I get sporadic a NullReferenceException when I work with the control. Unfortunately it is not reproducible.

Hopefully someone can help me. Thank you in advance.

Here is the call stack of the exception:

Description: The process was terminated due to an unhandled exception.

Exception Info: System.NullReferenceException

   at Telerik.Windows.Controls.GridView.CommonColumnHeaderInfo.<get_MaxWidth>b__a(Telerik.Windows.Controls.GridViewColumn)

   at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()

   at System.Linq.Enumerable.Sum(System.Collections.Generic.IEnumerable`1<Double>)

   at Telerik.Windows.Controls.GridView.CommonColumnHeaderInfo.get_MaxWidth()

   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.RealizeAndMeasureCells(Int32, Int32, System.Func`2<Int32,Int32>)

   at Telerik.Windows.Controls.GridView.CommonColumnHeadersPanel.UpdateVirtualizedCells()

   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)

   at System.Windows.Controls.ItemsPresenter.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Control.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Control.MeasureOverride(System.Windows.Size)

   at Telerik.Windows.Controls.GridView.GridViewRowItem.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at Telerik.Windows.Controls.GridView.CommonHeaderPresenter+VirtualizingStrategy.MeasureOverride(System.Windows.Size)

   at Telerik.Windows.Controls.GridView.CommonHeaderPresenter.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Grid.MeasureCell(Int32, Boolean)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean, Boolean ByRef)

   at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Control.MeasureOverride(System.Windows.Size)

   at Telerik.Windows.Controls.GridView.GridViewRowItem.MeasureOverride(System.Windows.Size)

   at Telerik.Windows.Controls.GridView.GridViewHeaderRow.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Grid.MeasureCell(Int32, Boolean)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean, Boolean ByRef)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean)

   at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.ScrollViewer.MeasureOverride(System.Windows.Size)

   at Telerik.Windows.Controls.GridView.GridViewScrollViewer.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Grid.MeasureCell(Int32, Boolean)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean, Boolean ByRef)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean)

   at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Control.MeasureOverride(System.Windows.Size)

   at Telerik.Windows.Controls.GridView.GridViewDataControl.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.DockPanel.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)

   at System.Windows.Controls.ContentPresenter.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Control.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)

   at System.Windows.Controls.ContentPresenter.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Grid.MeasureCell(Int32, Boolean)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean, Boolean ByRef)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean)

   at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Control.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at Telerik.Windows.Controls.ProportionalStackPanel.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)

   at System.Windows.Controls.ItemsPresenter.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Control.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)

   at System.Windows.Controls.ContentPresenter.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Control.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at Telerik.Windows.Controls.RadDockPanel.MeasureOverride(System.Windows.Size)

   at Telerik.Windows.Controls.DockingPanel.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at Telerik.Windows.Controls.RadDockPanel.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Control.MeasureOverride(System.Windows.Size)

   at Telerik.Windows.Controls.RadDocking.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.DockPanel.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

  at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Grid.MeasureCell(Int32, Boolean)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean, Boolean ByRef)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean)

   at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)

   at System.Windows.Controls.ContentPresenter.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Documents.AdornerDecorator.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Window.MeasureOverrideHelper(System.Windows.Size)

   at System.Windows.Window.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.ContextLayoutManager.UpdateLayout()

   at System.Windows.UIElement.UpdateLayout()

   at System.Windows.Interop.HwndSource.SetLayoutSize()

   at System.Windows.Interop.HwndSource.set_RootVisualInternal(System.Windows.Media.Visual)

   at System.Windows.Interop.HwndSource.set_RootVisual(System.Windows.Media.Visual)

   at System.Windows.Window.SetRootVisual()

   at System.Windows.Window.SetRootVisualAndUpdateSTC()

   at System.Windows.Window.SetupInitialState(Double, Double, Double, Double)

   at System.Windows.Window.CreateSourceWindow(Boolean)

   at System.Windows.Window.CreateSourceWindowDuringShow()

   at System.Windows.Window.SafeCreateWindowDuringShow()

   at System.Windows.Window.ShowHelper(System.Object)

   at System.Windows.Window.Show()

   at System.Windows.Window.ShowDialog()

   at Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.Open(Boolean)

   at Telerik.Windows.Controls.WindowBase.ShowWindow(Boolean)

   at Telerik.Windows.Controls.RadWindow.ShowDialog()

   at SELMOstudio.App.Target(System.Object, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs)

   at System.Windows.Threading.Dispatcher.CatchException(System.Exception)

   at System.Windows.Threading.Dispatcher.CatchExceptionStatic(System.Object, System.Exception)

   at System.Windows.Threading.ExceptionWrapper.CatchException(System.Object, System.Exception, System.Delegate)

   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)

   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

   at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr, IntPtr, Int32, IntPtr, IntPtr)

   at MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr, Int32, IntPtr, IntPtr)

   at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr, IntPtr, Int32, IntPtr, IntPtr)

   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

 

The columns will be added programmatically in code behind:

                m_dgOperands.Columns.Clear();
                selectedColumn = null;

                //Add the known columns 
                m_dgOperands.Columns.Add(new GridViewDataColumn()
                {
                    Header = "#",
                    DataMemberBinding = new Binding("ID"),
                    IsReadOnly = true,
                    CellStyleSelector = new StepStyleSelector(),
                });

                m_dgOperands.Columns.Add(new GridViewDataColumn()
                {
                    Header = "Step",
                    DataMemberBinding = new Binding("Name"),
                    //IsReadOnly = true,
                    CellStyleSelector = new StepStyleSelector(),
                    MinWidth = 150,
                });

                columnGroupName = new GridViewDataColumn();
                columnGroupName.Header = "GroupName";
                columnGroupName.DataMemberBinding = new Binding("GroupName");
                columnGroupName.GroupMemberPath = "GroupName";
                columnGroupName.CellStyleSelector = new StepStyleSelector();
                m_dgOperands.Columns.Add(columnGroupName);

                m_dgOperands.Columns.Add(new GridViewDataColumn()
                {
                    Header = "Info",
                    DataMemberBinding = new Binding("InfoText"),
                    IsReadOnly = true,
                    CellStyleSelector = new StepStyleSelector(),
                    CellTemplate = (DataTemplate)base.Resources["GridViewCellImageTextTemplate"],
                });

                m_dgOperands.Columns.Add(new GridViewDataColumn()
                {
                    Header = "",
                    IsReadOnly = true,
                    Width = 3,
                    MaxWidth = 3,
                    IsResizable = false
                });

                m_dgOperands.FrozenColumnCount = 4;

                foreach (var zone in seq.Zones)
                {
                    var item = new GridViewDataColumn();
                    item.UniqueName = zone.ID.ToString();
                    item.Header = zone.Name;
                    item.Footer = zone.Name;
                    item.DataMemberBinding = new Binding("ZoneValues[" + zone.ZoneValueIndex + "]");
                    item.Tag = zone;
                    item.CellStyleSelector = new ZoneStyleSelector();
                    item.IsVisible = zone.Visible;

                    CheckColumnGroup(zone, item);
                    m_dgOperands.Columns.Add(item);

                    SetZoneHeaderStyle(zone);
                    SelmoCreatorSequence_PropertyChanged(zone, new PropertyChangedEventArgs("ShowSystemZone"));
                }

                m_dgOperands.ItemsSource = seq.Steps;

Dilyan Traykov
Telerik team
commented on 07 Jun 2021, 08:53 AM

Thank you for the provided stack trace and code snippet.
Here's the code at the location of the exception for your reference:

public double MaxWidth { get { return this.RelatedColumns.Sum(c => c.MaxWidth); } }

It appears that for some reason one of the RelatedColumns is null. Can you please specify from which version onward you start observing this issue? If possible, please also try to replicate it in a small sample project so that I can further investigate its cause at my end.

For the time being, I can suggest setting the EnableColumnGroupsVirtualization property to False and see if the exception is still observed. Please let me know how this goes.

cwider
Top achievements
Rank 1
Iron
commented on 07 Jun 2021, 10:53 PM | edited

-------------------------------------------------------------------------------------------------------------------------------
Hi Dilyan, thank you at first for your assistance.
It seems that the problems start with the latest release (R2 2021) but I cannot confirm that.

I've tried to replicate the problem in a small project but I get not managed to get the exception again.

In the meantime I have another exception which seems to relate (because of CommonColumnHeaderInfo):
This exception only occured once today in my app. I'm also not able to reproduce them.
Thank you for providing your code snippet. How are the RelatedColumns filled or how is the relation to other columns?

"Object reference not set to an instance of an object."
Stack trace:
at Telerik.Windows.Controls.GridView.CommonColumnHeaderInfo.<get_IsVisible>b__6(GridViewColumn c)
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
at Telerik.Windows.Controls.GridView.CommonColumnHeaderInfo.get_IsVisible()
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.<MarkForRecycleCellsOfHiddenColumns>b__19(IColumnElement c)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MarkCellsForRecycle(Int32 startIndex, Int32 endIndex, Predicate`1 canRecycleCell)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MarkForRecycleCellsOfHiddenColumns(Int32 effectiveLeftMostIndex, Int32 effectiveRightMostIndex)
at Telerik.Windows.Controls.GridView.CommonColumnHeadersPanel.UpdateVirtualizedCells()
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureOverride(Size availableSize)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
at System.Windows.Controls.ItemsPresenter.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Control.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Border.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Control.MeasureOverride(Size constraint)
at Telerik.Windows.Controls.GridView.GridViewRowItem.MeasureOverride(Size availableSize)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at Telerik.Windows.Controls.GridView.CommonHeaderPresenter.VirtualizingStrategy.MeasureOverride(Size availableSize)
at Telerik.Windows.Controls.GridView.CommonHeaderPresenter.MeasureOverride(Size availableSize)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean

Thank you in advance and best regards
Christoph Wider
Dilyan Traykov
Telerik team
commented on 08 Jun 2021, 10:49 AM

Thank you for the new stack trace.
Here's the code for the IsVisible property of the CommonColumnHeaderInfo:

public bool IsVisible { get { return this.RelatedColumns.Any(c => c.IsVisible); } }

With this in mind, it is very likely that the cause for both exceptions is the same.

As for the RelatedColumns property, I can share the exact source code in a new support ticket, but basically - this property contains all the columns which belong to the particular column group or one of its parent column groups (on a higher level).

If you're unable to replicate this in a small sample project, can you please share more details on your exact setup and the action steps which lead to the exception so that I can try to isolate it at my end? Thank you in advance for your cooperation on the matter.
cwider
Top achievements
Rank 1
Iron
commented on 23 Jun 2021, 10:33 AM

I have tried to replicate the problem in a new project but I was not able to do that.
At this moment I have not enough time to invest more time on this matter.
For now I have an workaround: I set the property EnableColumnGroupsVirtualization to false. Then the exception no longer occurs.

Thank you for your time.
Best regards
Christoph

No answers yet. Maybe you can help?

Tags
GridView
Asked by
cwider
Top achievements
Rank 1
Iron
Share this question
or