title: sum value of selected cells in stringgrid
body: <p>How can I get the sum value of the selected cells or a range in <code>stringgrid</code>? Please note that  sometimes these cells contain string values!</p>
  
  <p>I try <code>GridCoord</code>, but it doesn't work good because sometimes there are "hidden columns". </p>
  
  <pre><code>procedure TMainShowForm.StgSelectionChanged(Sender: TObject; ALeft, ATop,
   ARight, ABottom: Integer);
  var
  i: Integer;
  gc: TGridCoord;
  sum:double;
  begin
    for i := 1 to stg.SelectedCellsCount do
      begin
        gc := stg.SelectedCell[i - 1];
        sum:=sum+stg.floats[(gc.X),(gc.Y)];
      end;
    AdvOfficeStatusBar1.Panels[0].Text:='Sum = '+ formatfloat('#,##0.',sum);
    AdvOfficeStatusBar1.Panels[1].Text:='Count = '+ inttostr(stg.SelectedCellsCount);
  end;
  </code></pre>