Delphi set Panel visible after post

Posted by Daan Kleijngeld on Stack Overflow See other posts from Stack Overflow or by Daan Kleijngeld
Published on 2013-11-08T08:52:29Z Indexed on 2013/11/08 9:54 UTC
Read the original article Hit count: 236

Filed under:

this is my code:

  if DRelatiebeheer.ContactpersoonID.Post = Action then
    KJSMDBGrid1.RefreshData;
  KJPanel4.Visible := true;

my question is how can i set the panel on visible when the post is succesfully ended.

I dont know how to fix it, tried many ways but didn't find a solution for the problem.

I think the code doesn't work, because i put it invisible on the OnGetCellParams event.

And I only want to set the last panel visible when the information is posted

procedure TFRelatiebeheer.KJSMDBGrid1GetCellParams(Sender: TObject);
begin
  if DRelatiebeheer.ACCID.AsInteger <= 0 then
    KJPanel3.Visible := false;
    KJPanel4.Visible := false;
  else
  begin
    KJPanel3.Visible := true;
end;

this is my OnGetCellParams event, this is the other

procedure TFRelatiebeheer.SaveCancel(Sender: TObject);
begin
  if (DRelatiebeheer.CID.State in [dsEdit, dsInsert]) then
    DRelatiebeheer.CID.Post;
  DRelatiebeheer.AID.Post;
  if DRelatiebeheer.CID.Post = Action then
    KJSMDBGrid1.RefreshData;
    KJPanel4.Visible := true;
  end;

© Stack Overflow or respective owner

Related posts about delphi