<!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>Quise decir que no me salga de la columna 4, ósea
si la cantidad es mayor a la existencia que me de un mensaje y se me quede en
dicha columna.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Saludos Reiterados</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>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=slibre@natio.co.cu href="mailto:slibre@natio.co.cu">Ismael L. Donis
Garcia</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=lazarus-es@lists.lazarus-ide.org
href="mailto:lazarus-es@lists.lazarus-ide.org">Spanish version of Lazarus
List</A> ; <A title=lazarus-es@lists.lazarus.freepascal.org
href="mailto:lazarus-es@lists.lazarus.freepascal.org">Spanish Lazarus</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, July 11, 2017 3:41
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> No cambiar de columna en
dbgrid</DIV>
<DIV><BR></DIV>
<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></BLOCKQUOTE></BODY></HTML>