GetGridRowCount method (WinStudio scripts)

Applies To

IWSFormComponent interface, unbound grid components and grid components bound to secondary collections

Definition

Returns the number of rows in an unbound grid component or a grid component bound to a secondary collection.

Syntax

object.GetGridRowCount( )

  Part   Description
object Required. A reference to a valid grid component.

Remarks

The return value is an integer indicating the number of rows in the grid component.

Example

Sub Main()
   Dim oGrid As IWSFormComponent
   Dim iCurrentRow As Integer
   Dim iCurrentColumn As Integer
   Dim iRowCount As Integer
   oGrid = ThisForm.Components("grid1")
   iCurrentRow = oGrid.GetGridCurrentRow()
   iCurrentColumn = ThisForm.Components("grid1").GetGridCurrentCol()
   iRowCount = ThisForm.Components("grid1").GetGridRowCount()
   'Display row, column, and row count numbers in a message box.
   Application.ShowMessage("Row = " & iCurrentRow.ToString() & vbLf & _
      "Column = " & iCurrentColumn.ToString() & vbLf & _
      "Number of rows = " & iRowCount.ToString())
End Sub
Related topics