>Hi all,
>i have a form with a grid on it. it has only one column.
>My table is : nField N(1,0), CField C(50)
>i want to show my records in this grid with below condition:
>if MyTable.nField = 1 , cField show in right alignment and
>if MyTable.nField = 2 , cField show in left alignment.
>How can i do this?
>Thanks
Because I am not sure if in VFP7 Column object has DynamicAlignment property.
Put another TextBox in the column where cField must be. Edit propertied in both TextBoxes.
In one Set Alignment = 1 - Right
in Other Alignment = 0 - Left
Then put in Init Event of the form:
thisform.ColumnWhereBothTextBoxesAre.DynamicCurrentControl =;
[IIF(MyTable.nField = 1,[TextBoxNameWhithRightAlignment],[TextBoxNameWhithLeftAlignment])]
If there is DynamicAlignment in VFP7 then all is much easier, no additional controls needed, just put in init of the form:
thisform.ColumnWhereBothTextBoxesAre.DynamicAlignment = [IIF(MyTable.nField = 1, 1,0)]
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.