Compartilhar via


DetailGroup.Add<TBusinessObject> Method (ListColumn<TBusinessObject>, TBusinessObject)

 

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

Namespace:   Microsoft.WindowsServerSolutions.Administration.ObjectModel
Assembly:  Microsoft.WindowsServerSolutions.Administration.ObjectModel (in Microsoft.WindowsServerSolutions.Administration.ObjectModel.dll)

Syntax

public DetailItem Add<TBusinessObject>(
    ListColumn<TBusinessObject> column,
    TBusinessObject businessObject
)
where TBusinessObject : class
public:
generic<typename TBusinessObject>
where TBusinessObject : ref class
DetailItem^ Add(
    ListColumn<TBusinessObject>^ column,
    TBusinessObject businessObject
)
Public Function Add(Of TBusinessObject As Class) (
    column As ListColumn(Of TBusinessObject),
    businessObject As TBusinessObject
) As DetailItem

Parameters

  • businessObject
    Type: TBusinessObject

    The business object from which the detail data will be retrieved.

Return Value

Type: Microsoft.WindowsServerSolutions.Administration.ObjectModel.DetailItem

An instance of DetailItem.

Type Parameters

  • 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.

Exceptions

Exception 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.

Examples

The following code example shows how to initialize a DetailGroup object that initializes a DetailItem with the specified ListColumn<TBusinessObject> 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);

See Also

Add Overload
DetailGroup Class
Microsoft.WindowsServerSolutions.Administration.ObjectModel Namespace

Return to top