This post: Is this a bug in the Grid Cell alignment? discusses a grid cell alignment issue.
When the grid is created and there is a cursor open in the current work area, a grid column will be created for each field in the cursor. The alignment for the column is initialized based on the column type. Integer fields are set to be right justified. When the subsequent code changes the column control source from integer to character, the alignment is not changed.
Below is the same code with a single change: after the ControlSource of the column is changed (which changes the data type from numeric to character) the Alignment is set explicitly.
DEFINE CLASS MyForm as Form
CREATE CURSOR test (num i,name c(40))
INSERT INTO test VALUES (0,"name")
INSERT INTO test VALUES (1,"name")
CREATE CURSOR test (num c(10),name c(40))
INSERT INTO test VALUES ("0","name")
INSERT INTO test VALUES ("1","name")
WITH this.grd as grid
WITH this.grd.column1 as Column
.ControlSource="'some data '"
.Alignment=3 && add this line after the control source is changed