I have added a custom column with a radSplitButton to my grid. When a button item is clicked, I would like to get the value from another cell in the row, delete the current row and delete other rows in the grid. I raise an event when a button item is clicked. I tried using the following code to subscribe to the event but the cellelement is nothing at this point. What is the best way to subscribe to the event?
Private Sub dgvReconcile_CreateCell(sender As Object, e As Telerik.WinControls.UI.GridViewCreateCellEventArgs) Handles dgvReconcile.CreateCell
Try
If e.Column IsNot Nothing AndAlso Not e.CellElement Is Nothing Then
If e.Column.Name = "CreateNew" AndAlso (TypeOf e.Row Is GridDataRowElement OrElse TypeOf e.Row Is GridNewRowElement) Then
Dim myElement As SplitButtonCellElement = DirectCast(e.CellElement, SplitButtonCellElement)
AddHandler myElement.NewClicked, AddressOf btnCreateNew_Click
End If
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub​