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