How to add the values dynamically to cells of the TStringGrid in delphi?
<pre><code>proedure TForm5.ButtonClick(Sender:TObject);
var
  I, J: Integer;
const
  MyArray: array [1..5] of string = ('Siva', 'jindal', 'ram', 'kesu', 'Srinu ');
begin
  StringGrid1.RowCount := StringGrid1.RowCount + 1;
  for J := 1 to length(MyArray);
  for I := 0 to
    StringGrid1.Cells[I,StringGrid1.RowCount-1] := MyArray[J];

  StringGrid1.Row := StringGrid.RowCount-1;
end;
</code></pre>

<p>In This i am able to create dynamically rows but unable to insert the values of the array into the cells.. </p>