BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: How to call TDBGridColumn Property Editor

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Writing
View previous topic :: View next topic  
Author Message
Joe Hatem
Guest





PostPosted: Mon Aug 11, 2003 11:10 am    Post subject: Re: How to call TDBGridColumn Property Editor Reply with quote



This probably worked fine with Delphi 5.
What is the equivalent for Delphi 6 ?

Thanks.

_____________________________________________
On Mon, 25 Feb 2002 "serge gubenko" <serge_gubenko (AT) yahoo (DOT) com> wrote:

Quote:
TDBGridColumnsProperty is a property editor for dbgrid's columns. It is
somewhere in the DCLDB50 package, and not exported, so you can't use it. But
the class of the columns editor form is public and you can use in order it
to build your own property editor for columns. Here's how you should manage
it:

1. Add Dbcolned and colnedit units to the uses clause of the unit with
future property editor.
2. Add dsnide50.dcp and dcldb50.dcp to the requires clause of the package.
3. Write new property editor. Here's the code:
_____________________________________________
TNewDBGridColumnsProperty = class(TCollectionProperty)
public
function GetEditorClass: TCollectionEditorClass; override;
end;

function TNewDBGridColumnsProperty.GetEditorClass: TCollectionEditorClass;
begin
Result:=Dbcolned.TDBGridColumnsEditor;
end;
____________________________________________
4. Register it in this way:

RegisterPropertyEditor(TypeInfo(TDBGridColumns), TYourComponent,
'Columns', TNewDBGridColumnsProperty);

Best regards, Serge Gubenko


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Writing All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.