WinStudio
IWSIDOCollection interface
Returns an integer indicating the status of a specified IDO collection object.
object.GetSecondaryCollectionNumber()
Part |
Description |
object | Required. The name of a valid IDO collection object. |
The return value is one of the following integers:
1 | The specified object is the primary IDO collection. |
2, 3, ... n | The index or numeric value of a secondary IDO collection, where n is an integer. |
-2 | The specified object is a subcollection, not a secondary IDO collection. |
-3 | The specified object has an invalid entry. |
Sub Main() Dim oCache As IWSIDOCollection Dim iValue As Integer oCache = ThisForm.Components("grid1").IDOCollection iValue = oCache.GetSecondaryCollectionNumber() If iValue = 1 Then Application.ShowMessage("The specified collection is the primary collection.") ElseIf iValue = -2 Then Application.ShowMessage("The specified collection is a subcollection, not a secondary collection.") ElseIf iValue = -3 Then Application.ShowMessage("The specified collection is an invalid entry.") Else Application.ShowMessage("The index number of the specified secondary collection is " _ & iValue & ".") End If End Sub