Table of Contents

Class DetailList

Namespace
Tripous.Data
Assembly
Tripous.Data.dll

Represents a list of MemTable instances, detail to a master MemTable.

Both the master and the detail MemTable instances must belong to the same DataSet, otherwise an exception is thrown.

public class DetailList : Collection<MemTable>, IList<MemTable>, ICollection<MemTable>, IReadOnlyList<MemTable>, IReadOnlyCollection<MemTable>, IEnumerable<MemTable>, IList, ICollection, IEnumerable
Inheritance
DetailList
Implements
Inherited Members
Extension Methods

Properties

Active

Activates and de-activates the master-detail relation-ship between the master MemTable and the details.

WARNING: Tables MUST HAVE already columns created.

public bool Active { get; set; }

Property Value

bool

Methods

ClearItems()

Removes all tables from the list, deactivating their master-detail relationships.

protected override void ClearItems()

Contains(string)

Returns true if a table with the specified TableName exists in the list.

public bool Contains(string TableName)

Parameters

TableName string

Returns

bool

Find(string)

Returns the table with the specified TableName, if found, else null.

public MemTable Find(string TableName)

Parameters

TableName string

Returns

MemTable

Get(string)

Returns the table with the specified TableName, if found, else throws an exception.

public MemTable Get(string TableName)

Parameters

TableName string

Returns

MemTable

InsertItem(int, MemTable)

Inserts DetailTable at the specified index, setting its Master to the Tripous.Data.DetailList.OwnerTable and activating the relationship if the list is active.

protected override void InsertItem(int index, MemTable DetailTable)

Parameters

index int
DetailTable MemTable

RemoveItem(int)

Removes the table at the specified index, deactivating its master-detail relationship and clearing master references recursively.

protected override void RemoveItem(int index)

Parameters

index int