Hi
I am using an example you provided in a previous reply to implement drag and drop from a radgridview. When using the mouse down event to pass row information into an array if the row being dragged is being edited the application crashes completely. How do I handle this (test for the row edit state) to prevent the crash?
Regards
Joe
Private Sub RadGridView1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles SubContractgrd.MouseDown
Try
downpoint = e.Location
rowtodrag = GetRowAtPoint(Me.SubContractgrd, e.Location)
ContArray(0, 0) = (rowtodrag.Cells(0).Value)
ContArray(0, 1) = (rowtodrag.Cells(1).Value)
ContArray(0, 2) = (rowtodrag.Cells(2).Value)
If Not IsNothing(rowtodrag.Cells("Text").Value) Then
ContArray(0, 2) = Replace(StrConv(rowtodrag.Cells("Text").Value, VbStrConv.Uppercase), " ", "")
Else
ContArray(0, 2) = (rowtodrag.Cells(1).Value)
End If
If Not IsNothing(rowtodrag.Cells("D").Value) Then
ContArray(0, 3) = "SD"
End If
If Not IsNothing(rowtodrag.Cells("V").Value) Then
If Not IsNothing(ContArray(0, 3)) Then
ContArray(0, 3) = "SDV"
Else
ContArray(0, 3) = "SD"
End
End If
End If
End If
Catch ex As Exception
If Err.Number = 91 Then
Err.Clear()
Exit Sub
Else
MsgBox(Err.Description & Err.Number)
End If
End Try
End Sub