Ver Mensaje Individual
  #4  
Antiguo 01-12-2010
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Reputación: 38
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola juaarias y bienvenido.

A ver si estos ejemplos te sirven...

Para controlar si todas las celdas del StringGrid (creo que a ese componente te referís) podés hacer:
Código Delphi [-]
function TForm1.FaltanDatos: Boolean;
var
  c,f: Integer;
begin
  Result:= False;
  for c:= StringGrid1.FixedCols to StringGrid1.ColCount -1 do
    for f:= StringGrid1.FixedRows to StringGrid1.RowCount -1 do
      if StringGrid1.Cells[c, f] = '' then
        Result:= True;
end;

Ejemplo de llamada:
Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
begin
  if FaltanDatos then
    ShowMessage('Faltan ingresar valores');
end;

Para avisar en cada celda si se sale de editar sin un valor podés usar el evento OnSetEditText del TStringGrid:
Código Delphi [-]
procedure TForm1.StringGrid1SetEditText(Sender: TObject; ACol, ARow: Integer; const Value: String);
begin
  if Value = '' then
  ShowMessage('Ingrese un valor');
end;

Un saludo.
Responder Con Cita