Hola...
Tienes de dos, sumar los valores al momento de irlos asignando al grid:
Código Delphi
[-]
var
ResultadoTotal: Integer;
begin
ResultadoTotal := 0;
ResultadoTotal := ResultadoTotal + ValorAgregado1;
ResultadoTotal := ResultadoTotal + ValorAgregado2;
ResultadoTotal := ResultadoTotal + ValorAgregado3;
end;
O también puedes usar las 3 filas anteriores al resultado para sumarlas:
Código Delphi
[-]
var
ResultadoTotal: Integer;
I: Integer;
begin
ResultadoTotal := 0;
for I := sgGrafica.RowCount - 3 to Pred(sgGrafica.RowCount) do
ResultadoTotal := ResultadoTotal + StrToInt(sgGrafica.Cells[1, I]);
sgGrafica.RowCount := sgGrafica.RowCount + 1;
sgGrafica.Cells[0, Pred(sgGrafica.RowCount)] := 'Resultado Total';
sgGrafica.Cells[1, Pred(sgGrafica.RowCount)] := ResultadoTotal
end;
Saludos...