Unplanned
Last Updated: 03 Sep 2026 09:02 by Martin Ivanov
Martin Ivanov
Created on: 03 Sep 2026 09:02
Category: PropertyGrid
Type: Bug Report
0
PropertyGrid: NullReferenceException is thrown when entering edit mode on a field with a custom editor
A NullReferenceException is thrown when a field with a custom editor enters edit mode. The issue occurs when the RenderMode is set to Flat and the fields are grouped by category (IsGrouped=true). To recreate the issue the grouping should be enabled during runtime.

Here is the stacktrace of the error:
Telerik.Windows.Controls.Data.dll!Telerik.Windows.Controls.RadPropertyGrid.EnsureSourceProperty(Telerik.Windows.Controls.Data.PropertyGrid.PropertyDefinition propertyDefinition) Line 3279 C#  Telerik.Windows.Controls.Data.dll!Telerik.Windows.Controls.RadPropertyGrid.RetrieveCurrentContextPropertyValue(Telerik.Windows.Controls.Data.PropertyGrid.PropertyDefinition propertyDefinition) Line 3207 C#  Telerik.Windows.Controls.Data.dll!Telerik.Windows.Controls.Data.PropertyGrid.PropertyGridField.CurrentContextPropertyValue.get() Line 70 C#  Telerik.Windows.Controls.Data.dll!Telerik.Windows.Controls.Data.PropertyGrid.PropertyGridField.SetDataContextWhenEditorAttributeIsSet(System.Windows.FrameworkElement content, Telerik.Windows.Controls.Data.PropertyGrid.PropertyDefinition contextPropertyDefinition) Line 394 C#  Telerik.Windows.Controls.Data.dll!Telerik.Windows.Controls.Data.PropertyGrid.PropertyGridFieldContentPresenter.PrepareEditor() Line 184 C#  Telerik.Windows.Controls.Data.dll!Telerik.Windows.Controls.Data.PropertyGrid.PropertyGridFieldContentPresenter.BeginEdit() Line 93 C#  Telerik.Windows.Controls.Data.dll!Telerik.Windows.Controls.RadPropertyGrid.BeginEditSafe(Telerik.Windows.Controls.Data.PropertyGrid.PropertyGridField field) Line 1243 C#  Telerik.Windows.Controls.Data.dll!Telerik.Windows.Controls.RadPropertyGrid.EnsureFieldForEditOperation(Telerik.Windows.Controls.Data.PropertyGrid.PropertyDefinition propertyDefinition, System.Action<Telerik.Windows.Controls.Data.PropertyGrid.PropertyGridField> finishedCallback, System.Action<Telerik.Windows.Controls.Data.PropertyGrid.PropertyDefinition> failedCallback) Line 1194 C#  Telerik.Windows.Controls.Data.dll!Telerik.Windows.Controls.RadPropertyGrid.BeginEdit(Telerik.Windows.Controls.Data.PropertyGrid.PropertyDefinition propertyDefinition) Line 1224 C#
  Telerik.Windows.Controls.Data.dll!Telerik.Windows.Controls.RadPropertyGrid.BeginEdit() Line 1204 C#  Telerik.Windows.Controls.Data.dll!Telerik.Windows.Controls.Data.PropertyGrid.PropertyGridFieldContentPresenter.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs e) Line 57 C#
To work this around set the EnableEditorCaching property to False.

<telerik:RadPropertyGrid EditMode="Single" RenderMode="Flat" EnableEditorCaching="False" />

0 comments