Pues a mí me sale todo este código:
Código:
procedure TForm1.Button1Click(Sender: TObject);
var
nFilas:Variant;
nAltoRejilla:Integer;
nCont:Integer;
nNuevoAlto:Integer;
begin
nNuevoAlto:=40;//alto que le vamos a dar a las filas
nAltoRejilla:=TStringGrid(DbGrid1).GridHeight;
nFilas:=int(nAltoRejilla / nNuevoalto); //filas = AltoRejilla / NuevoAlto
TStringGrid(DbGrid1).RowCount:=nFilas; //Aplicamos nuevo número de filas
For nCont:=0 to nFilas -1 do
begin
//Ahora modificamos el Alto de todas ellas incluida la de título
TStringGrid(DBGrid1).rowheights[nCont] := nNuevoAlto;
end;
end;
procedure TForm1.Table1AfterScroll(DataSet: TDataSet);
begin
{Para que se siga redibujando correctamente cuando
movamos el Dataset que repercute sobre la rejilla}
DbGrid1.Refresh;
end;
Un Saludo.