Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DataSet property of DataSource not assigned on SetDataSource Event

10 views
Skip to first unread message

Delphi3Net

unread,
Nov 16, 2006, 4:48:35 AM11/16/06
to
I have a following problem. I made my own data-aware component. On the
creation of the component in the SetDataSource event i want to access
to DataSet property of DataSource. But on the create it not assigned
(DataSource.DataSet=Nil). How can I manually assign this DataSet
property so that I can access this DataSet property in the event I
mentioned.

This is my code:

procedure TmyNewDBComponent.SetDataSourceEdit(
const Value: TDataSource);
begin
//FDataLink.DataSource:=Value;

if not (FDataLink.DataSourceFixed and (csLoading in ComponentState))
then
FDataLink.DataSource := Value;
if Value <> nil then Value.FreeNotification(Self);
//at this point FDataLink.DataSource.DataSet=NIL !!!!!
end;

0 new messages