Hello,
I have the following example:
AdvStringGrid1.MergeCells(0,0,3,1);
AdvStringGrid1.Cells[0,0]:='abcl';
AdvStringGrid1.Alignments[0,0]:=taCenter;
DBAdvGrid1.MergeCells(0,0,3,1);
DBAdvGrid1.Cells[0,0]:='abcl';
DBAdvGrid1.Alignments[0,0]:=taCenter;
When I run this example I have 'abcl' centered among the merged cells in TAdvStringGrid but the same doesn't happen for TDBAdvGrid.
Why is it ?
Many thanks
Alberto
Please use:
DBAdvGrid1.Columns[0].HeaderAlignment:= taCenter;
Alignment in TDBAdvGrid is set at column level. For all normal cells within a column this is done via grid.Columns[colindex].Alignment and for fixed cells via grid.Columns[colindex].HeaderAlignment