WinStudio
IWSFormComponent interface, grid components
Returns the value of a cell in a specified grid component.
object.GetGridValue( integer1, integer2 )
Part |
Description |
object | Required. A reference to a valid grid component. |
integer1 | Required. The row number. |
integer2 | Required. The column number. |
The return value is a string containing the value of the cell contents at a particular row/column location.
The index for the row and column numbers is not zero-based. In a grid, the first row is row 1, and the first column is column 1.
Sub Main() Dim cellValue As String Dim curRow As Integer Dim curCol As Integer 'Get the location and value of the selected cell. curRow = ThisForm.Components("grid1").GetGridCurrentRow() curCol = ThisForm.Components("grid1").GetGridCurrentCol() cellValue = ThisForm.Components("grid1"). _ GetGridValue(curRow, curCol) 'Display the value in a message box. Application.ShowMessage("The value of the cell is: " _ & vbLf & vbLf & " " & cellValue) End Sub