B
bbscom
Unregistered / Unconfirmed
GUEST, unregistred user!
在写控件时,继承TDBGridEh的TitleBtnClick事件出现找不到方法?
procedure TitleBtnClick(ACol: Integer; Column: TColumnEh); [red]override;//override这个地方出错;;[/red]
...
procedure TDBGridE.TitleBtnClick(ACol: Integer; Column: TColumnEh);
begin // 主要是排序功能
Inherited;
if Self.DataSource.DataSet is TCustomADODataSet then
if TCustomADODataSet(Self.DataSource.DataSet).Sort = Column.FieldName + ' ASC' then
TCustomADODataSet(Self.DataSource.DataSet).Sort := Column.FieldName + ' DESC'
else TCustomADODataSet(Self.DataSource.DataSet).Sort := Column.FieldName + ' ASC';
end;
下面出现的提示:
Build
[Error] DBGridE.pas(27): Method 'TitleBtnClick' not found in base class
[Fatal Error] Package1.dpk(71): Could not compile used unit 'DBGridE.pas'
procedure TitleBtnClick(ACol: Integer; Column: TColumnEh); [red]override;//override这个地方出错;;[/red]
...
procedure TDBGridE.TitleBtnClick(ACol: Integer; Column: TColumnEh);
begin // 主要是排序功能
Inherited;
if Self.DataSource.DataSet is TCustomADODataSet then
if TCustomADODataSet(Self.DataSource.DataSet).Sort = Column.FieldName + ' ASC' then
TCustomADODataSet(Self.DataSource.DataSet).Sort := Column.FieldName + ' DESC'
else TCustomADODataSet(Self.DataSource.DataSet).Sort := Column.FieldName + ' ASC';
end;
下面出现的提示:
Build
[Error] DBGridE.pas(27): Method 'TitleBtnClick' not found in base class
[Fatal Error] Package1.dpk(71): Could not compile used unit 'DBGridE.pas'