>Dear Experts
>
>There is a grid with data, but I do not know the number of columns.
>The columns are more than Three in every case.
>Some times columns are 5 and some times 8.
>The number of columns may be different every time.
>
>I want to apply following FORMAT on Column Headers
>
>hearheight=30
>font=bold
>alighnment=2
>
>Also I want to apply following FORMAT Column 3 to last column
>
>format=z
>inputmask=99,99,999.99
>
>The grid show data from a cursor as
>thisform.grdtable.recordsource ="TRY2"
>
>Please help
You might try
WITH thisform.mygrid
.setall("hearheight","30","header")
.setall("fontbold",.T.,"header")
.setall("alignment",2,"header")
FOR I = 3 TO .ColumnCount
WITH .columns(i)
.format = ............
.inputmask = ............
ENDWITH
ENDFOR
ENDWITH