IsCurrentObjectTheAutoInsertRow method (WinStudio scripts)

Applies To

IWSIDOCollection interface

Definition

Returns a Boolean value indicating whether the current object in a specified IDO collection is the automatically inserted row (the autoinsert row) in a grid.

Syntax

object.IsCurrentObjectTheAutoInsertRow( )

  Part   Description
object Required. The name of a valid IDO collection object.

Remarks

A return value of:

  • TRUE indicates that the current object is the autoinsert row.
  • FALSE indicates that the current object is not the autoinsert row.

Use this method if the specified IDO collection has focus. If the specified IDO collection might not have focus, use instead the IsObjectTheAutoInsertRow method.

Example

Sub Main()
    Dim oCache As IWSIDOCollection
    Dim iNumEntries As Integer
    Dim iLoopCounter As Integer
    oCache = ThisForm.PrimaryIDOCollection.GetSubCollection("UserGroupMaps", -1)
    iNumEntries = oCache.GetNumEntries
    iLoopCounter = 0
    Do While iLoopCounter < iNumEntries
        If oCache.IsCurrentObjectTheAutoInsertRow() = False Then
            If oCache.IsObjectModified(iLoopCounter) = False Then
        Application.ShowMessage("Row " & (iLoopCounter + 1) & " has NOT been modified.")
            Else
        Application.ShowMessage("Row " & (iLoopCounter + 1) & " has been modified.")
            End If
        Else
            Application.ShowMessage("This is the auto-insert row.")
        End If
        iLoopCounter = iLoopCounter + 1
    Loop
End Sub