Programmatically change align Columns.

(Question reformulated)

I have a TTMSFMXGrid just dropped on the form. All the configuration tasks has been made programmatically. I don't want to use the visual editor for nothing. I don't have defined, the editor types of the columns, because the cells are not going to be editables. I don't want to modify properties on the Object Inspector. In this situation...

How to set the align of some arbitrary columns to Right?

You can use the HorzAlignments property for each cell:


  TMSFMXGrid1.HorzAlignments[0, 0] := TTextAlign.Trailing;

Or you can implement the event OnGetCellLayout and set the text alignment (dynamically):

procedure TForm143.TMSFMXGrid1GetCellLayout(Sender: TObject; ACol,
  ARow: Integer; ALayout: TTMSFMXGridCellLayout; ACellState: TCellState);
begin
  ALayout.TextAlign := TTextAlign.Trailing;
end;