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;