I've got a problem with the VB version of the Check All code from the knowledge base:
http://www.telerik.com/support/kb/winforms/gridview/add-check-uncheck-all-check-box-in-the-header-cell.aspx
The difference in my case is that I add the column programmatically to a grid, and it's the last column in the grid.
The code works great unless the grid view is wide enough to cause a horizontal scroll bar. When I scroll sideways, back and forth a few times, I get a NullReferenceException when trying to check or uncheck a check box on an individual record. Screenshot of error below. Full stacktrace is below.
Anyone else have this problem? Any suggestions?
http://www.telerik.com/support/kb/winforms/gridview/add-check-uncheck-all-check-box-in-the-header-cell.aspx
The difference in my case is that I add the column programmatically to a grid, and it's the last column in the grid.
The code works great unless the grid view is wide enough to cause a horizontal scroll bar. When I scroll sideways, back and forth a few times, I get a NullReferenceException when trying to check or uncheck a check box on an individual record. Screenshot of error below. Full stacktrace is below.
Anyone else have this problem? Any suggestions?
System.NullReferenceException was unhandled HResult=-2147467261 Message=Object reference not set to an instance of an object. Source=ProductPricingModeller.WinForms StackTrace: at ProductPricingModeller.WinForms.UseCurrentPriceHeaderCellElement.GridControl_ValueChanged(Object sender, EventArgs e) in E:\CODE\JssProductPricingModeller\ProductPricingModeller.WinForms\UseCurrentPriceHeaderCellElement.vb:line 201 at System.EventHandler.Invoke(Object sender, EventArgs e) at Telerik.WinControls.UI.RadGridView.OnValueChanged(Object sender, EventArgs e) at Telerik.WinControls.UI.EventDispatcher.RaiseEvent[T](Object eventKey, Object sender, T args) at Telerik.WinControls.UI.BaseGridEditor.OnValueChanged() at Telerik.WinControls.UI.RadCheckBoxEditor.SetValue(Object value) at Telerik.WinControls.UI.RadCheckBoxEditor.set_Value(Object value) at Telerik.WinControls.UI.RadCheckBoxEditor.ToggleState() at Telerik.WinControls.UI.RadCheckBoxEditorElement.OnMouseUp(MouseEventArgs e) at Telerik.WinControls.RadElement.OnCLREventsRise(RoutedEventArgs args) at Telerik.WinControls.RadElement.OnBubbleEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadItem.OnBubbleEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e) at Telerik.WinControls.RadElement.CallDoMouseUp(MouseEventArgs e) at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e) at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e) at Telerik.WinControls.UI.RadGridView.OnMouseUp(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at Telerik.WinControls.RadControl.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(ApplicationContext context) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at ProductPricingModeller.WinForms.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: 