SPListItemCollection.ReorderItems Method

Reorders items in the list.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Sub ReorderItems ( _
    arrMovedItems As Boolean(), _
    arrNewPositions As Integer(), _
    positionOffset As Integer _
)
'Usage
Dim instance As SPListItemCollection
Dim arrMovedItems As Boolean()
Dim arrNewPositions As Integer()
Dim positionOffset As Integer

instance.ReorderItems(arrMovedItems, _
    arrNewPositions, positionOffset)
public void ReorderItems(
    bool[] arrMovedItems,
    int[] arrNewPositions,
    int positionOffset
)

Parameters

  • arrMovedItems
    Type: []

    A Boolean array that contains bits that specify whether items need to be updated.

  • arrNewPositions
    Type: []

    An integer array that specifies new positions for items in the collection.

  • positionOffset
    Type: System.Int32

    A 32-bit integer that specifies the starting position of the items that are being reordered.

Remarks

This method checks the data for the list item to ensure that it is current, and reorders the items in the collection from the position specified by the positionOffset parameter with the new positions specified by the arrNewPositions parameter.

See Also

Reference

SPListItemCollection Class

SPListItemCollection Members

Microsoft.SharePoint Namespace