Hello,
You can extend columns using mouse.
or using this script, let's say you have three columns:
procedure Form1_TableGrid1_OnChange (Sender: string);
begin
Form1.TableGrid1.Columns[0].Options := Form1.TableGrid1.Columns[0].Options + coAutoSize;
Form1.TableGrid1.Columns[1].Options := Form1.TableGrid1.Columns[1].Options + coAutoSize;
Form1.TableGrid1.Columns[2].Options := Form1.TableGrid1.Columns[2].Options + coAutoSize;
end;
Also you can enable auto fit columns width, depending on their content, example:
procedure Form1_TableGrid1_OnChange (Sender: string);
begin
Form1.TableGrid1.BestFitColumns(bfBoth);
end;
Dmitry.