WinStudio
IWSFormComponent interface, grid components
Returns the value of a cell in the specified grid component, using the column name to specify the column.
object.GetGridValueByColumnName( integer, string )
Part |
Description |
object | Required. A reference to a valid grid component. |
integer | Required. Integer indicating the row number. |
string | Required. String indicating the name of the column. |
The return value is a string containing the value of the designated cell.
The index for the row number is not zero-based. In a grid, the first row is row 1.
If the row number is 0, the caption of the grid column component is returned.
Sub Main() Dim cellValue As String Dim curRow As Integer curRow = ThisForm.Components("grid1").GetGridCurrentRow() cellValue = ThisForm.Components("grid1"). _ GetGridValueByColumnName(curRow, "gridColumn1") Application.ShowMessage("The event name for this row is: " _ & vbLf & vbLf & " " & cellValue) End Sub