ViewFieldCollection.MoveFieldTo Method

Moves the field with the specified field internal name to the specified position in the collection.

Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
<RemoteAttribute> _
Public Sub MoveFieldTo ( _
    field As String, _
    index As Integer _
)
'Usage
Dim instance As ViewFieldCollection
Dim field As String
Dim index As Integer

instance.MoveFieldTo(field, index)
[RemoteAttribute]
public void MoveFieldTo(
    string field,
    int index
)

Parameters

  • index
    Type: System.Int32

    Specifies the position for the field. The first position is 0

Exceptions

Exception Condition
[Microsoft.SharePoint.SPException]

Field does not exist in the collection. Error code: -2146232832

Remarks

It must not be a null reference (Nothing in Visual Basic). Its value must be equal to or greater than 0.

See Also

Reference

ViewFieldCollection Class

ViewFieldCollection Members

Microsoft.SharePoint.Client Namespace