NamCit
asked on
The TDBGRID is moved when get all new record from TTable ?
Dear Advisor !
I use Delphi 5.0
TDBGRID is moved (be wriggled), when i retrieve new data from Table.
I also used InputForm.OrderTable.Disab leConTrol. But it is not effcted.
Thanks for all
I use Delphi 5.0
TDBGRID is moved (be wriggled), when i retrieve new data from Table.
I also used InputForm.OrderTable.Disab
Thanks for all
ASKER
Dear !
"Moved" is meant "to be shaked"
There is no error for the customer. But i want the TDBGRID to be shake a little so that.
My code (after adding your comment) :
DataQuery := HopDongForm.Query ;
With DataQuery Do
BeGin
Active := False ;
SQL.Clear ;
SQL.Add('select a.*, b.tendv from cthopdong a') ;
SQL.Add('left outer join dmdv b on a.madv = b.madv');
SQL.Add('where sohd = :sohd') ;
Parameters.ParamValues['so
Open ;
First ;
DataControl := HopDongForm.DetailTable ;
try
DataControl.DisableControl
While not Eof do
Begin
DataControl.Append ;
DataControl.FieldByName('m
DataControl.FieldByName('t
DataControl.FieldByName('m
DataControl.FieldByName('t
DataControl.FieldByName('d
Next ;
End ;
DaTaControl.First ;
Finally ;
DataControl.EnableControls
end ;
End ;
ASKER
Still not effected
ASKER
What should i do next ?
I dont want TDBGRID to be "alive" when updating data .
Addtion, before insert new record, i delete all old record
?
add a order by clause
add a order by clause
ASKER
Please show me clearly
Try setting DoubleBuffered to True.
Best Regards.
Marcos.
Best Regards.
Marcos.
ASKER
Dear Marcoszorrilla !
I just set OrderForm.DoubleBuffered to True. But not effected.
Delete the old records immediately after DataControl.DisableControl s. Perhaps deleting shakes your grid.
Regards, Geo
Regards, Geo
ASKER
Yes, before updating new data, i should delete old data.
That makes TDBGrid "alive"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Best Regards.
Marcos.
try
DmNv.Ven.Disablecontrols;
While not DmNv.Ven.EOF do
begin
nUnis:=nUnis + DmNv.Venunidades.Value;
nImporte:=nImporte + DmNv.VENIMPORTE.Value;
nComision:= nComision + DmNv.VENTTLCOMIS.Value;
DmNv.Ven.Next;
end;
Finally
DmNv.Ven.Enablecontrols;