Neven MacEwan asked:

> I was thinking that it would not be too difficult to use a
> TCollection as a Dataset
> (Then I could edit the collection with a DBGrid et al)
>
> Has anyone tried/used/written a component to do this

Yep, I wrote a TDataSet derivative that is supplied data via an interface.
The general idea being that anything that I wanted to use data-aware
editing on could implement this interface, and then I could treat it as a
dataset when needed.

One of the things that I have created that provides this interface was a
TCollection decendant. So in a couple of places in our application we now
have data-aware edito grids editing an underlying TCollection datastore
sucessfully.

In fact there are more than one interface that I defined as to provide
access to the data, a basic interface that provides the absolute minimal
support, plus another for more advanced features. In the future it may be
worth my while defined more interfaces to provide optional support for
indexes, filtering and other stuff. Then this would have managed to turn
the horriblly designed TDataSet class into what it should be, which is a
collection of optional interfaces providing support for the various
features that datasets can provide.

Cheers, Max.


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to