ListColumnCollection.Add Method (String, String)
Adds a ListColumn object to the ListColumnCollection with the specified display name and the specified property name. The property name is retrieved from the business object and is used as the display value for the object in the column.
Namespace: Microsoft.EssentialBusinessServer.Console.ObjectModel
Assembly: Microsoft.EssentialBusinessServer.Console.ObjectModel (in microsoft.essentialbusinessserver.console.objectmodel.dll)
Usage
Syntax
'Declaration
Public Function Add ( _
displayName As String, _
propertyName As String _
) As ListColumn(Of TBusinessObject)
public ListColumn<TBusinessObject> Add (
string displayName,
string propertyName
)
public:
ListColumn<TBusinessObject>^ Add (
String^ displayName,
String^ propertyName
)
public ListColumn<TBusinessObject> Add (
String displayName,
String propertyName
)
public function Add (
displayName : String,
propertyName : String
) : ListColumn<TBusinessObject>
Parameters
- displayName
The display name of the column.
- propertyName
A property name of a business object from which the column value will be retrieved.
Return Value
An instance of ListColumn that was added to the ListColumnCollection.
Example
The following code example shows how to initialize a ListColumnCollection with a specified display name and property name:
ListColumnCollection<BusinessObject> columns = null;
columns = new ListColumnCollection<BusinessObject>();
ListColumn<BusinessObject> column = null;
column = columns.Add("Computer Name", "ComputerName");
Exceptions
Exception type | Condition |
---|---|
ArgumentException | One or more of the parameters are not valid. |
ArgumentNullException | One or more of the parameters are null. |
Remarks
TBusinessObject represents a business object that encapsulates information and methods that relate to business data or business functionality. The information in the business object is exposed as properties.
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.
Platforms
Development Platforms
Windows Server 2008 64-bit Edition, Windows Vista 64-bit Edition, Windows Essential Business Server 2008 Standard, Windows Essential Business Server 2008 Premium
Target Platforms
Windows Essential Business Server 2008 Standard, Windows Essential Business Server 2008 Premium
See Also
Reference
ListColumnCollection Generic Class
ListColumnCollection Members
Microsoft.EssentialBusinessServer.Console.ObjectModel Namespace