Hola amigos.
Estoy escribiendo una función para saber si una linea de un grid esta vacía
Código Delphi
[-]
function IsRowEmpty(Grid: TGrid): Boolean;
var
NumCols: Integer;
i, Camp: Integer;
begin
NumCols := Grid.Columns.Count;
Result := False;
Camp := 0;
with Grid do begin
first;
while not eof do begin
for i := 0 to NumCols - 1 do begin
if VarType(SelectRow.Value[i]) = 1 then
inc(Camp);
end;
Next;
end;
end;
if Camp = NumCols then
Result := True;
end;
El problema es que desearía desconectar al inicio, los eventos OnBeforePost y OnAfterPost y volver a implementarlos al final.
Para desconectarlos no tengo problema:
Código Delphi
[-]
Grid.OnBeforePost:=nil;
Grid.OnAfterPost:=nil
Lo que no se como hacer es para reponerlos.
Mucha gracias.