Partilhar via


GroupedItemPicker.AddSelectedItem Method

Takes a string ID and a string name. Marks the item with that ID and name as part of the initial selection when the control is rendered.

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Sub AddSelectedItem ( _
    id As String, _
    name As String _
)
'Usage
Dim instance As GroupedItemPicker
Dim id As String
Dim name As String

instance.AddSelectedItem(id, name)
public void AddSelectedItem(
    string id,
    string name
)

Parameters

  • id
    Type: System.String

    The ID used in the set of possible items.

  • name
    Type: System.String

    The name that is used in the set of possible items.

Exceptions

Exception Condition
ArgumentNullException

The id parameter or name parameter is a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

The id parameter or name parameter is empty.

See Also

Reference

GroupedItemPicker Class

GroupedItemPicker Members

Microsoft.SharePoint.WebControls Namespace