Share via


ListColumnCollection.Add Method (String, String, IFormatProvider, 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. A format string and a format provider that are used to format the display value are also specified.

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, _
    formatProvider As IFormatProvider, _
    format As String _
) As ListColumn(Of TBusinessObject)
public ListColumn<TBusinessObject> Add (
    string displayName,
    string propertyName,
    IFormatProvider formatProvider,
    string format
)
public:
ListColumn<TBusinessObject>^ Add (
    String^ displayName, 
    String^ propertyName, 
    IFormatProvider^ formatProvider, 
    String^ format
)
public ListColumn<TBusinessObject> Add (
    String displayName, 
    String propertyName, 
    IFormatProvider formatProvider, 
    String format
)
public function Add (
    displayName : String, 
    propertyName : String, 
    formatProvider : IFormatProvider, 
    format : 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.
  • formatProvider
    The IFormatProvider that is used to format the value of the column.
  • format
    The format string that is used to format the value that is displayed in the column.

Return Value

An instance of ListColumn that was added to the ListColumnCollection.

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.

If the type that propertyName represents implements IFormattable, the formatProvider and format are used to call ToString on the instance of the property.

For more information about using format providers and customizing the format of strings, see “Customizing Format Strings” at the Microsoft Web site (https://go.microsoft.com/fwlink/?LinkId=116099).

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