i have override the OnClick event and can determine that i clicked cell (2,5). i want to reference the value in (2,0). how do i reference the value of a cell in column 0 of any cell that is clicked in a given row?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
From a CellContext you can get the grid instance using the Grid property.
You can cast it to a SourceGrid.Grid object and so read and write to any cells.
Davide
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dim val As Object = sender.Position
Dim work() As String = val.ToString.Split(CChar(";"))
If Not val Is Nothing Then
MessageBox.Show(sender.Grid, val.ToString & " " & work(0))
End If
i can see that i clicked (2,5)
it is not apparent to me how i can get column 0 of row 2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i have override the OnClick event and can determine that i clicked cell (2,5). i want to reference the value in (2,0). how do i reference the value of a cell in column 0 of any cell that is clicked in a given row?
From a CellContext you can get the grid instance using the Grid property.
You can cast it to a SourceGrid.Grid object and so read and write to any cells.
Davide
ok, i am a little lost.
i if do this:
Dim val As Object = sender.Position
Dim work() As String = val.ToString.Split(CChar(";"))
If Not val Is Nothing Then
MessageBox.Show(sender.Grid, val.ToString & " " & work(0))
End If
i can see that i clicked (2,5)
it is not apparent to me how i can get column 0 of row 2
This is a code for VB (if I remember well the VB syntax):
DirectCast(sender.Grid, SourceGrid.Grid).Item(0, 2).Value
Davide
thanx. it is actually
valueTest = DirectCast(sender.Grid, SourceGrid.Grid).Item(2, 0).Value