Subject Re: [IBO] IB_Grid .. determining FiledName from event IB_GridTitleClick
Author Dmitry Beloshistov
Hello, Adrian!
You wrote to "ibobjects @ yahoogroups.com" <IBObjects@yahoogroups.com> on
Sun, 18 Aug 2002 23:06:00 +0200:

AW> IB_GridTabDataTitleClick(Sender: TObject; ACol,
AW> ARow: Integer; AButton: TMouseButton; AShift: TShiftState);

AW> Acol has an integer value for the Column clicked.

AW> How do I now get the Fieldname of the title column clicked, so that
AW> I can sort the query on the specicif column clicked.

procedure TForm1.MyGridTitleClick(Sender: TObject; ACol,
ARow: Integer; AButton: TMouseButton; AShift: TShiftState);
var TmpCol:TIB_Column;
begin
with MyGrid do
TmpCol:=GridFields[DataCol[ACol]];
if Assigned(TmpCol) then
ShowMessage(TmpCol.FieldName);
end;



WBR, Dmitry Beloshistov AKA [-=BDS=-]
e-mail: torin@...