Compartilhar via


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

 

Initializes a DetailItem object with the specified display name, the specified ListColumn<TBusinessObject> object, and the specified business object. After the DetailItem is initialized, the item is added to the DetailGroup.

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

Syntax

public DetailItem Add<TBusinessObject>(
    string displayName,
    ListColumn<TBusinessObject> column,
    TBusinessObject businessObject
)
where TBusinessObject : class
public:
generic<typename TBusinessObject>
where TBusinessObject : ref class
DetailItem^ Add(
    String^ displayName,
    ListColumn<TBusinessObject>^ column,
    TBusinessObject businessObject
)
Public Function Add(Of TBusinessObject As Class) (
    displayName As String,
    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.

Examples

The following code example shows how to initialize a DetailGroup object that initializes a DetailItem with the specified display name, 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(“Computer Name”, column, businessObj);

See Also

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

Return to top