NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ListManager.Position

Gets or sets the position of the list.

[Visual Basic]
Public Property Position As Integer
[C#]
public int Position {get; set;}
[C++]
public: __property int get_Position();
public: __property void set_Position(int);
[JScript]
public function get Position() : int;
public function set Position(int);

Property Value

The number of the position.

Remarks

Use the position to navigate through the collection. For example, to create a control that increments through each row of the list, simply add 1 to the current position until the Count property is reached.

Example [Visual Basic]

[Visual Basic]

Private Sub MoveNext(lm As ListManager)
   If li.Position = Count - 1 Then 
      MessageBox.Show("You're at end of the records")
   Else
      li.Position += 1
   End If
End Sub

Private Sub MoveFirst(lm As ListManager)
   lm.Position = 0
End Sub

Private Sub MovePrevious(lm As ListManager)
   If lm.Position = 0 Then
      MessageBox.Show("You're at the beginning of the records.")
   Else
      lm.Position -= 1
   End if
End Sub

Private Sub MoveLast(lm As ListManager)
   lm.Position = lm.Count - 1
End Sub

See Also

ListManager Class | ListManager Members | System.WinForms Namespace