My boss just showed this to me, though it's been in the application for a while. If a user double clicks on the divider between columns in the column header on this one RadGridView control in my app, the following exception is thrown:
Here is the XAML for the RadGridView in question:
With some experimenting, I've found that the exception is thrown only if you click on those columns that contain "*" in their Widths. if you set it to Auto or a fixed value, it doesn't happen.
Tony
2012-07-18 09:11:18,106 [1] FATAL CarSystem.App [(null)] - Invalid value! Parameter name: value at Telerik.Windows.Controls.GridViewLength..ctor(Double value, GridViewLengthUnitType type, Double desiredValue, Double displayValue) at Telerik.Windows.Controls.GridView.GridViewHeaderCell.OnColumnHeaderGripperDragCompleted(Object sender, DragCompletedEventArgs e) at System.Windows.Controls.Primitives.DragCompletedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e) at System.Windows.Controls.Primitives.Thumb.OnMouseLeftButtonUp(MouseButtonEventArgs e) at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 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)Here is the XAML for the RadGridView in question:
<telerik:RadGridView AutoExpandGroups="True" AutoGenerateColumns="False" CanUserDeleteRows="False" CanUserFreezeColumns="False" CanUserInsertRows="False" CanUserResizeColumns="True" CanUserSortColumns="True" EnableColumnVirtualization="True" EnableRowVirtualization="True" FontSize="16" FontWeight="Bold" IsReadOnly="True" MouseDoubleClick="HotListEntriesGrid_MouseDoubleClick" Name="HotListEntriesGrid" SelectionChanged="HotListEntriesGrid_SelectionChanged" SelectionUnit="FullRow" ScrollViewer.CanContentScroll="True" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" ToolTip="Matching Hot List Entries"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn DataMemberBinding="{Binding Plate, Mode=OneWay}" Header="Plate" Width="1.5*" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding LocaleCode, Mode=OneWay}" Header="State" Width="75" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding ListName, Mode=OneWay}" Header="Hot List" Width="150" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding AlarmClass, Mode=OneWay}" Header="Alarm Class" Width="175" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding Notes, Mode=OneWay}" Header="Notes" Width="1*" /> </telerik:RadGridView.Columns> </telerik:RadGridView>With some experimenting, I've found that the exception is thrown only if you click on those columns that contain "*" in their Widths. if you set it to Auto or a fixed value, it doesn't happen.
Tony