<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.5512" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Como se podrá impedir que el curso abance una
columna al dar enter en un dbgrid en el evento EditingDone?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Tengo lo siguiente:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>dbg: TDBGrid;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Y quiero en el evento:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>procedure Tfvsal.dbgEditingDone(Sender:
TObject);<BR>begin<BR> if (dbg.SelectedIndex = 4) then
begin<BR> if
(dbg.DataSource.DataSet.FieldByName('cantidad').AsFloat >
dbg.DataSource.DataSet.FieldByName('exist').AsFloat) then begin<BR>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV> </DIV>
<DIV>//..........</DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>//que al entrar aqui me salga de la columna 4
</FONT></DIV><FONT face=Arial size=2></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face=Arial size=2></FONT></FONT> </DIV>
<DIV><FONT face=Arial size=2><FONT face=Arial
size=2>//..........</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face=Arial size=2> </DIV>
<DIV><BR></FONT> Application.MessageBox('La
cantidad a dar salida no puede ser mayor a la existencia.' ,
pchar(Self.Caption), MB_ICONINFORMATION);<BR>
dbg.DataSource.DataSet.FieldByName('cantidad').AsFloat :=
0;<BR>
dbg.DataSource.DataSet.FieldByName('saldo2').AsFloat:=0;<BR>
dbg.DataSource.DataSet.FieldByName('saldo1').AsFloat:=0;</FONT></DIV>
<DIV><FONT face=Arial size=2> end else
begin<BR> try<BR>
dbg.DataSource.DataSet.FieldByName('saldo2').AsFloat:=StrToFloat(FormatCurr('#0.00',
dbg.DataSource.DataSet.FieldByName('cantidad').AsFloat *
dbg.DataSource.DataSet.FieldByName('pre2').AsFloat));<BR>
except<BR>
dbg.DataSource.DataSet.FieldByName('saldo2').AsFloat:=0;<BR>
end;<BR> try<BR>
dbg.DataSource.DataSet.FieldByName('saldo1').AsFloat:=StrToFloat(FormatCurr('#0.00',
dbg.DataSource.DataSet.FieldByName('cantidad').AsFloat *
dbg.DataSource.DataSet.FieldByName('pre1').AsFloat));<BR>
except<BR>
dbg.DataSource.DataSet.FieldByName('saldo1').AsFloat:=0;<BR>
end;<BR> end;<BR> end;<BR>end;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Saludos Cordiales</FONT></DIV>
<DIV><FONT face=Arial size=2>--<BR>Ismael<BR>Devuan User : <A
href="http://distrowatch.com/table.php?distribution=devuan">http://distrowatch.com/table.php?distribution=devuan</A></FONT></DIV></BODY></HTML>