> > Hi,

> >

> > Just wondering if it's possible to display numeric values in a grid with leading zero's when the number is too short. For example the grid (and table) contains:

> >

> > 10

> > 200

> > 4010

> >

> > I would prefer to see in my form's grid:

> >

> > 0010

> > 0200

> > 4010

> >

> > This would be much easier to read.

> > Unfortinately I cannot use character fields for these values, only numeric values.

> >

> > Regards, Gerrit

>

> Dear Gerrit,

>

> How about using an expression as the column's controlsource?

>

> For example:

>

> grid.column1.controlsource = " (RIGHT('0000' + ALLTRIM(STR(recordfield)), 4))"

>

> Brad Sanmarie

There are special functions for the purpose of padding strings and numbers: PADL; PADR, PADC

PADL(number,length,'0')

-Anders