TDatasetList 1.0

Tested under Delphi 3,4.

A component to enable opening, closing, posting, cancelling and refreshing a collection of datasets on your form as a group. Attach the control to each dataset you want opened automatically when the form is created and no coding is necessary to open the datasets. Double-clicking the component in design state will open/close all linked datasets as well.

Separate TDatasetList components can be used to open different sets of datasets.

TDatasetList Properties:

    DataSets: TdslCollection
        A TCollection to hold TdslItems which is the list of datasets and
        properties/events for each.

    OpenInDesigner: boolean
        If True the datasets in the list will be opened when in design mode.
        Toggling this value will open/close the datasets while designing. The
        boolean can be toggled in the object inspector, a submenu of the
        component, or by double-clicking the component.

    AutoOpen: boolean
        If True the datasets are opened after the form is created without
        any extra coding.

    AutoClose: boolean
        If True the datasets are closed prior to the form being closed.

TDatasetList Procedures:

    procedure OpenAll;
        Opens all datasets in the list.

    procedure CloseAll;
        Closes all datasets in the list.

    procedure CancelAll;
        Cancels all datasets in the list that are in edit/insert mode.

    procedure PostAll;
        Posts all datasets in the list that are in edit/insert mode.

    procedure RefreshAll;
        Performs a Refresh on all datasets in the list.


TdslItems Properties: (TCollection items in TDatasetList)

    DataSet: TDataSet
	A dataset selected from available datasets.

    IncludeInOpen: boolean
	If False this dataset is skipped when using the OpenAll procedure.

    IncludeInClose: boolean
	If False this dataset is skipped when using the CloseAll procedure.

    IncludeInPost: boolean
	If False this dataset is skipped when using the PostAll procedure.

    IncludeInCancel: boolean
	If False this dataset is skipped when using the CancelAll procedure.

    IncludeInRefresh: boolean
	If False this dataset is skipped when using the RefreshAll procedure.

    OnClose: TOnCloseOperation
	Either ocPost or ocCancel. Determines what operation to take when a
	dataset is being closed and it is in Edit/Insert state.

TdslItems Events:

    BeforeOpen: TNotifyEvent
    AfterOpen: TNotifyEvent
    BeforeClose: TNotifyEvent
    AfterClose: TNotifyEvent
    BeforeCancel: TNotifyEvent
    AfterCancel: TNotifyEvent
    BeforePost: TNotifyEvent
    AfterPost: TNotifyEvent
    BeforeRefresh: TNotifyEvent
    AfterRefresh: TNotifyEvent

	These add extra events that take place before the datasets own
	before/after events. This can be useful if you want to use multiple
	TDatasetList components to open/close different groups of datasets
	and provide different routines for each group.



Contact me for questions, comments or suggestions:

Jeff Swim
doodler@doodler.com
http://www.doodler.com
