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.
  • TRUE: If the destination object is marked invalid because it previously failed a validation, marks all components bound to properties as modified (needing validation). If the destination object is not marked invalid, marks all components bound to properties as not modified (not needing validation). The TRUE parameter provides normal WinStudio behavior.
  • FALSE: Does not change the modified state of components bound to properties. With the FALSE parameter, the valid/invalid state of the destination object is disregarded.

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