I am trying to Setup a TAdvStringGrid where if I right Click on the Column header It can be Edited. Is this Possible and if so how? Below is the MouseDown method I have So far.
procedure TFrmMain.FldPartsMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
ACol : Integer;
ARow : Integer;
begin
FldParts.MouseToCell(X,Y,ACol,ARow);
if Button = mbRight then
begin
if ARow = 0 then
begin
FldParts.FixedRowAlways := False;
FldParts.ReadOnly[ACol,ARow] := False;
FldParts.EditMode := True;
end;
end
else
begin
if ACol = 0 then
FldParts.RowSelect[ARow] := True;
FldParts.BeginDrag(False);
end;
end;
var
ACol : Integer;
ARow : Integer;
begin
FldParts.MouseToCell(X,Y,ACol,ARow);
if Button = mbRight then
begin
if ARow = 0 then
begin
FldParts.FixedRowAlways := False;
FldParts.ReadOnly[ACol,ARow] := False;
FldParts.EditMode := True;
end;
end
else
begin
if ACol = 0 then
FldParts.RowSelect[ARow] := True;
FldParts.BeginDrag(False);
end;
end;
Thanks in Advance
Donald S. Bossen