Re: TZF - TzGrid DepressColumnTitle Event
bo ekelund <[email protected]>
| Newsgroups | gmane.comp.lang.delphi.topaz,gmane.spam.detected |
|---|---|
| Message-ID | <[email protected]> |
Try this one
procedure TKTVForm.TzGrid2DepressTitle(Sender: TObject;
curColumn: TTzColumn);
begin
ktvdata.Post; { post the changes if any }
FSortKey := '';
if (curColumn.Field = Nil) then
exit
else FSortKey := curColumn.Field.FieldName;
SetAutoHaltOff;
ShowMsg('Sort. Please wait...');
ktvdata.IndexOn(FSortKey, FIndexFile);
HideMsg;
SetAutoHaltOn;
if tzcommon.DBFError = 0 then
FSorted := TRUE
else begin
showmessage('Sort failed');
FSorted := FALSE;
end;
ktvdata.GoTop;
end;
----- Original Message -----
From: Jerry
To: [email protected]
Sent: Friday, February 14, 2003 10:31 PM
Subject: Re: TZF - TzGrid DepressColumnTitle Event
Hi Bob,
OK...now I'm confused. I'm using Topaz v7.5 with Delphi 5.
I can not find any event called TitleClick associated with the Topaz Grid.
OnTitleClick yes but it declaration is procedure
TProductGridViewForm.TzGrid1TitleClick(Sender: TObject; curColumn: TTzColumn);
Your TitleClick is procedure TfrmMain.TzGrid6TitleClick(Column: TColumn);
Are we using the same package?
Regards Jerry
----- Original Message -----
From: [email protected]
To: [email protected]
Sent: Thursday, February 13, 2003 1:39 AM
Subject: Re: TZF - TzGrid DepressColumnTitle Event
This works for me ... not sure about any page 190 of topaz manual.
I use titleClick rather than depressColumnTitle.
Hope this is of assistance,
Bob Watson
______________________________________________________________
procedure TfrmMain.TzGrid6TitleClick(Column: TColumn);
var
s1,s2:string;
hRecNo:Integer;
begin
hRecNo:=DM.DBF_Parent.RecNo;
s2:=Column.FieldName;
IF (Column.Field.DataType=ftDate) then s1:='Substr(DTOC('+Column.FieldName+'),7,4)+DTOC('+Column.FieldName+')'
else IF (Column.Field.DataType=ftBoolean) then s1:='IIF('+s2+',''1'',''0'')'
else s1:=Column.FieldName;
DM.DBF_Parent.SetIndexTo('');
DM.DBF_Parent.IndexOn(s1,'J_Par_IX');
DM.DBF_Parent.Go(hRecNo);
end;
______________________________________________________
In a message dated 2/11/2003 8:10:49 PM Eastern Standard Time, [email protected] writes:
Anyone any idea where this event is....DepressColumnTitle
It's mentioned in the topaz manual page 190 but I can't find it.
Wanted to sort data by clicking on a column but I'm lost.
But then again...what else is new.
Thank god for Topaz For Delphi List!
Many Thanks
Jerry
This email was sent to: [email protected]
EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a4wgeQ.Ym9AYm9l
Or send an email to: [email protected]
TOPICA - Start your own email discussion group. FREE!
http://www.topica.com/partner/tag02/create/index2.html
==^==^=============================================================
==^^===============================================================
This email was sent to: [email protected]
EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5kvff.Z2NsZHQt
Or send an email to: [email protected]
TOPICA - Start your own email discussion group. FREE!
http://www.topica.com/partner/tag02/create/index2.html
==^^===============================================================