|
AddHandler Me.sfDataGrid1.CurrentCellActivated, AddressOf SfDataGrid1_CurrentCellActivated
Private Sub SfDataGrid1_CurrentCellActivated(ByVal sender As Object, ByVal e As CurrentCellActivatedEventArgs)
Try
'The current cell value can be retrieved by using the GridCellRendererBase.GetControlValue method
' when the CurrentCell value is not null.
If sfDataGrid1.CurrentCell IsNot Nothing Then
' Get the CurrentCellValue
'Dim currentCellValue As String
Dim currentCellRowIndex As Integer = 0
Dim currentCellColumnIndex As Integer = 0
Dim currentCellColumn As Object = Nothing
Dim currentCellValue As Object = Me.sfDataGrid1.CurrentCell.CellRenderer.GetControlValue()
currentCellRowIndex = Me.sfDataGrid1.CurrentCell.RowIndex
currentCellColumnIndex = Me.sfDataGrid1.CurrentCell.ColumnIndex
currentCellColumn = Me.sfDataGrid1.CurrentCell.Column
MessageBox.Show(currentCellValue.ToString() & System.Environment.NewLine & currentCellRowIndex.ToString(), "Current Cell Value")
End If
Catch ex As Exception
'TODO: INSTANT C# TODO TASK: Calls to the VB 'Err' object are not converted by Instant C#:
MessageBox.Show(ex.Message)
End Try
End Sub
|