MoveCurrentIndexAndRefresh method (WinStudio scripts)
Applies To
IWSIDOCollection interface
Definition
Navigates to an object in a collection specified by row index number, makes the object current, repaints components bound to properties in the collection, and sets the Modified State of the components.
Syntax
object.MoveCurrentIndexAndRefresh( integer, Boolean )
| Part | Description | 
| object | Required. A reference to a valid IDO collection object. | 
| integer | Required. A row
                                       					 index number. The index number of the first row in a collection is 0. | 
| Boolean | Required. Sets
                                       					 the modified state of components. 
 | 
Remarks
A return value of:
- TRUE indicates the method executed successfully.
- FALSE indicates that the method did not execute successfully.
This method does not cause the current object to be validated before it navigates to another object.
Examples
Sub Main()
   Dim iRow As Integer
   iRow = 0
   ThisForm.CurrentIDOCollection.MoveCurrentIndexAndRefresh(iRow, True)
End Sub
Sub Main()
   Dim bOK As Boolean
   Dim iNewRow As Integer
   Dim bSetProp As Boolean
   iNewRow = ThisForm.Variables("NewRow").GetValue(Of Integer)() - 1
   bSetProp = ThisForm.Variables("SetProp").GetValue(Of Boolean)()
   bOK = ThisForm.PrimaryIDOCollection.MoveCurrentIndexAndRefresh(iNewRow, bSetProp)
   If Not bOK Then
      'Code to handle error.
   End If
End Sub