LCL, grids: InsertRowWithValues adjust first the number of columns then insert row, fix insert a row in a fixed grid, issue #26943

git-svn-id: trunk@46766 -
This commit is contained in:
jesus 2014-11-06 19:41:05 +00:00
parent 02113e0100
commit bd19001549

View File

@ -10594,9 +10594,9 @@ procedure TCustomStringGrid.InsertRowWithValues(Index: Integer;
var
i: Integer;
begin
InsertColRow(false, Index);
if Length(Values) > ColCount then
ColCount := Length(Values);
InsertColRow(false, Index);
for i := 0 to Length(Values)-1 do
Cells[i, Index] := Values[i];
end;