Ver Mensaje Individual
  #8  
Antiguo 06-12-2007
Avatar de alexander_lv
alexander_lv alexander_lv is offline
Miembro
 
Registrado: mar 2007
Ubicación: Colombia - Quindio - Circasia
Posts: 11
Reputación: 0
alexander_lv Va por buen camino
ME MARCA EL SIG ERROR INCOMPATIBLE TYPE:'INTEGER' AND 'STRING'

Código Delphi [-]
PROCEDURE TFORM1.TOOLBUTTON1CLICK(SENDER: TOBJECT);
BEGIN
 STRINGGRID3.CELL[0,0]:=STRINGGRID1.CELL[0,0]+STRINGGRID2.CELL[0,0];
END;


la respuesta es porque no puedes sumar dos cadenas tienes que convertirlas antes de trabajar con ellas

Código Delphi [-]
 PROCEDURE TFORM1.TOOLBUTTON1CLICK(SENDER: TOBJECT);
 BEGIN
 STRINGGRID3.CELL[0,0]:=IntToStr(StrToInt(STRINGGRID1.CELL[0,0])+StrToInt(STRINGGRID2.CELL[0,0]));
 END;

Última edición por alexander_lv fecha: 06-12-2007 a las 21:03:47.
Responder Con Cita