多行数据,你说的是不是换行?
给你下面的代码,不行就自己改改
在DrawCell里写事件
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
var
S: string;
R: TRect;
begin
with TStringGrid(Sender) do
begin
S := Cells[ACol, ARow];
R := Rect;
DrawText(Canvas.handle, PChar(S), -1, R, DT_WORDBREAK);
end;
end;