Recent

Author Topic: dbgrid something strange when i add append  (Read 2078 times)

eldonfsr

  • Full Member
  • ***
  • Posts: 193
dbgrid something strange when i add append
« on: June 02, 2021, 11:30:26 pm »
Some strange on dbgrid when append a record in table show me the row with values i put in there but olso show me row complete empty but the problem is the cursor going to that row...

    ZMQDSDetKarArt.Append;
     ZMQDSDetKarArt.FieldByName('numdoc').AsString :=EDoc.Text;
     ZMQDSDetKarArt.FieldByName('nuevo').AsString :='Y';
     ZMQDSDetKarArt.FieldByName('precio').AsFloat :=0.000;
     ZMQDSDetKarArt.FieldByName('cantidad').AsFloat :=0.000;
     ZMQDSDetKarArt.FieldByName('importe').AsFloat :=0.00;
     DBGDetMovDoc.Refresh;
     DBGDetMovDoc.SelectedIndex:=0;
     DBGDetMovDoc.SetFocus;

bpranoto

  • Full Member
  • ***
  • Posts: 103
Re: dbgrid something strange when i add append
« Reply #1 on: June 03, 2021, 03:35:39 am »
Put
Code: Pascal  [Select][+][-]
  1. ZMQDSDetKarArt.Post;

after

Code: Pascal  [Select][+][-]
  1. ZMQDSDetKarArt.FieldByName('importe').AsFloat :=0.00;

eldonfsr

  • Full Member
  • ***
  • Posts: 193
Re: dbgrid something strange when i add append
« Reply #2 on: June 05, 2021, 11:36:49 pm »
Thanks ....

 

TinyPortal © 2005-2018