This is a migrated thread and some comments may be shown as answers.

Bug in CellBeginEdit event in Private Sub rg_States_CellBeginEdit(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellCancelEventArgs) Handles rg_AssumptionGroupsTypes.CellBeginE

1 Answer 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 21 Feb 2008, 05:16 AM
hi,
i have the latet download (yesterday) on the winform control.

I founf this bug, let me explain

I have data from a Datatable bound to the grid.  A simple code, decription.  I wnt to be able to add new codes and descriptions but once added I want he code to be readonly.  So I add this code to the form


    Private Sub rg_States_CellBeginEdit(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellCancelEventArgs) Handles rg_AssumptionGroupsTypes.CellBeginEdit
        'Cancel edit if we are on an existing row and column 0
        ' turns the State abr to readonly
        If e.RowIndex > -1 Then
            If e.ColumnIndex = 0 Then
                e.Cancel = True
            End If
        End If
    End Sub

The purpose of the code is to check if the current column is 0 and we have a rowindex then I want to cancel the edit using the GridViewCellCancelEventArgs method cancel

This is great works first time but if you click very fast on the cell it exceptions . 

Here is the error

System.NullReferenceException was unhandled
  Message="Object reference not set to an instance of an object."
  Source="Telerik.WinControls.GridView"
  StackTrace:
       at Telerik.WinControls.UI.GridDataCellElement.SetEditorFocus()
       at Telerik.WinControls.UI.GridDataCellElement.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.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadElement.DoMouseUp(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(Int32 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 HousingCashFlow.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
       at System.AppDomain._nExecuteAssembly(Assembly 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.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()


I have found other bugs in the grid as well but this one is cheesing me off.


Greg

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 21 Feb 2008, 02:56 PM
Hi Greg,

Thank you for contacting us.

Unfortunately we are aware of this issue. It will be addressed in the Q1 2008 release. A beta of Q1 2008 is expected in the upcoming days, which will contain the fix for the mentioned issue.

Do not hesitate to write me, if you need further assistance.

 
All the best,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
Greg
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or