IsObjectTheAutoInsertRow method (WinStudio scripts)

Applies To

IWSIDOCollection interface

Definition

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

Syntax

object.IsObjectTheAutoInsertRow( integer )

  Part   Description
object Required. The name of a valid IDO collection object.
integer Required. The index number of an object in the entries for the current IDO collection.

Remarks

A return value of:

  • TRUE indicates that the specified row is the autoinsert row.
  • FALSE indicates that the specified row is not the autoinsert row.

If the specified IDO collection might not have focus, use this method. If the specified IDO collection has focus, use the IsCurrentObjectTheAutoInsertRow method.

Example

Sub SelectAll(ByVal InputSelected As Integer)
    Dim i As Integer
    Dim iSelectedQty As Decimal
    Dim oSubCol As IWSIDOCollection
    oSubCol = ThisForm.Components("SerialGrid").IDOCollection
    iSelectedQty = 0
    For i = 0 To oSubCol.GetNumEntries - 1
        If (Not oSubCol.IsObjectTheAutoInsertRow(i)) Then
            oSubCol.SetObjectPropertyPlusModifyRefresh("UbSelect", i, CStr(InputSelected))
            If InputSelected = 0 Then
                oSubCol.SetObjectModified(i, False)
            End If
            iSelectedQty = iSelectedQty + InputSelected
        End If
    Next i
    ThisForm.PrimaryIDOCollection.SetCurrentObjectPropertyPlusModifyRefresh("UbSelectedQty", CStr(iSelectedQty))
    If InputSelected = 0 Then
        oSubCol.SetCurrentObjectModified(False)
    End If
    oSubCol = Nothing
End Sub