Microsoft.SharePoint.WebCon ...


PickerEntity Class (Microsoft.SharePoint.WebControls)

Namespace: Microsoft.SharePoint.WebControls
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Syntax

Visual Basic (Declaration)
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
Public Class PickerEntity
Visual Basic (Usage)
Dim instance As PickerEntity
C#
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)] 
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)] 
public class PickerEntity
Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.WebControls.PickerEntity
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also

Tags :


Community Content

Stanley Roark
PickerEntity

Description

The PickerEntityclass enables you to work with an object that represents an entity. When you work with an instance of the PickerEntityclass you set properties to reflect data that a query returns. Properties that you set are DisplayText, Key, Description, and IsResolved.

Usage Scenario

You will commonly work with the PickerEntity class when you override the GetEntity method for a custom query control. Such controls may inherit from classes such as the SimpleQueryControl class.

The following code example shows how to override the GetEntity method and return a customized PickerEntity object.

C# Code Example

public override PickerEntity GetEntity(DataRow entityData)
{
PickerEntity entity = new PickerEntity();
entity.DisplayText = entityData["Name"];
entity.Key = entityData["Key"];
entity.Description = entityData["Description"];
entity.IsResolved = true;
return entity;
}

Visual Basic .NET Code Sample

Public Overrides Function GetEntity(ByVal entityData As DataRow) As PickerEntity
Dim entity As New PickerEntity()
entity.DisplayText = entityData("Name")
entity.Key = entityData("Key")
entity.Description = entityData("Description")
entity.IsResolved = True
Return entity
End Function
Tags : sharepoint

Page view tracker