Hi,
I'm using the RadGridView with a custon filter row like it is shown in one of the demo samples. I also have on custom column configuration dialog that is used to add, remove or reorder columns. When the column configuration is modified within this dialog I first remove all Columns and FilterDescriptors. Then I add the columns again according to the new configuration. When I try to add the FilterDescriptors I get an exception with the following message and stacktrace:
Object reference not set to an instance of an object.
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
I'm adding the FilterDescriptors in the DataType PropertyChanged event of the columns. I'm doing it this way because otherwise the correct DataType is not available.
When I add the same FilterDescriptors some time later in the click event handler of a button, the exception does not occur.
Any suggestions? Is there another event that is fired some time after DataType PropertyChanged event of the columns and can be used to add the FilterDescriptors.
Regards,
Uli
I'm using the RadGridView with a custon filter row like it is shown in one of the demo samples. I also have on custom column configuration dialog that is used to add, remove or reorder columns. When the column configuration is modified within this dialog I first remove all Columns and FilterDescriptors. Then I add the columns again according to the new configuration. When I try to add the FilterDescriptors I get an exception with the following message and stacktrace:
Object reference not set to an instance of an object.
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
I'm adding the FilterDescriptors in the DataType PropertyChanged event of the columns. I'm doing it this way because otherwise the correct DataType is not available.
When I add the same FilterDescriptors some time later in the click event handler of a button, the exception does not occur.
Any suggestions? Is there another event that is fired some time after DataType PropertyChanged event of the columns and can be used to add the FilterDescriptors.
Regards,
Uli