Share via


DetailGroup.Add Generic Method (Generic ListColumn, TBusinessObject)

Initializes a DetailItem object with the specified ListColumn object and the specified business object, and then adds the object to the DetailGroup.

Namespace: Microsoft.EssentialBusinessServer.Console.ObjectModel
Assembly: Microsoft.EssentialBusinessServer.Console.ObjectModel (in microsoft.essentialbusinessserver.console.objectmodel.dll)

Usage

Syntax

'Declaration
Public Function Add(Of TBusinessObject) ( _
    column As ListColumn(Of TBusinessObject), _
    businessObject As TBusinessObject _
) As DetailItem
public DetailItem Add<TBusinessObject> (
    ListColumn<TBusinessObject> column,
    TBusinessObject businessObject
)
public:
generic<typename TBusinessObject>
DetailItem^ Add (
    ListColumn<TBusinessObject>^ column, 
    TBusinessObject businessObject
)

Parameters

  • column
    The ListColumn object that is used to define the display name and the display value for the DetailItem.
  • businessObject
    The business object from which the detail data will be retrieved.

Return Value

An instance of DetailItem.

Example

The following code example shows how to initialize a DetailGroup object that initializes a DetailItem with the specified ListColumn object and business object:

ListColumnCollection<BusinessObject> columns = null;
columns = new ListColumnCollection<BusinessObject>();

ListColumn<BusinessObject> column = null;
column = columns.Add("ComputerName", "ComputerName");
column.IsRequired = true;

DetailGroup group = new DetailGroup("Computer Information");
DetailItem item = null;
   
item = group.Add(column, businessObj);

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

DetailGroup Class
DetailGroup Members
Microsoft.EssentialBusinessServer.Console.ObjectModel Namespace