Ver Mensaje Individual
  #4  
Antiguo 10-10-2007
Avatar de Ivanzinho
[Ivanzinho] Ivanzinho is offline
Miembro Premium
 
Registrado: ene 2005
Ubicación: Galicia
Posts: 595
Reputación: 20
Ivanzinho Va por buen camino
Cita:
Empezado por lejia Ver Mensaje
si, pero dentro de que evento del dbgrid, leo el onvalidate, porque lo quiero que cuando termine de editar una celda.?
No lo tienes que leer dentro de ningun evento del dbgrid, es un evento que se ejecuta antes de que el valor sea almacenado en el buffer.

Cita:
Empezado por Ayuda de delphi
Occurs just before the data is written to the record buffer.

type TFieldNotifyEvent = procedure(Sender: TField) of object;
property OnValidate: TFieldNotifyEvent;

Description

Write an OnValidate event handler to validate changes made to the data in the field, just before the data is written to the current record buffer. The EditMask property allows validation of the data on a character by character basis while it is being entered by the user. OnValidate allows an application to validate the data as a whole.

When the value of a field component is assigned programmatically, validation by the EditMask is bypassed, since there is no data-aware control to enforce adherence to the mask. OnValidate allows an application to validate such data before it is posted to the database table.

To reject the current value of the field from the OnValidate event handler, raise an exception.

When writing the value of a field to the current record buffer, the following steps occur:

1 The OnValidate event handler is called to validate the data.
2 If the OnValidate event handler does not raise an exception, the data is written to the current record buffer.
3 If writing the data does not raise an exception, the OnChange event handler is called to allow a response to the change.
__________________
Si no lees esto no vivirás tranquilo
Non lle pońades chatas â obra namentras non se remata. O que pense que vai mal que traballe n’ela; hai sitio para todos. (Castelao)
Responder Con Cita