Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dynamic Display of Text in Column

94 views
Skip to first unread message

Alex.K

unread,
Feb 2, 2009, 12:40:49 PM2/2/09
to
Hello,

I have a column bound to a text field that can contain from no characters to
9 characters, usually they are digits but sometimes can contain letters.

Now the problem:

Free standalone Table - Grid with Read-only column

I need to format the text to display the data from the field right justified
:
Examples with 1 to 9 characters:

123456-78-9
23456-78-9
3456-78-9
456-78-9
56-78-9
6-78-9
-78-9
- 8-9
- -9

To display this properly on the screen or in read-only text fields, I use
TRANSFORM(PADL(ALLT(MyData),9),'@R XXXXXX-XX-X') but I can not get this to
work in the grid column.

I have tried all combos of InputMask and Format and can not get this to work
properly.

Any help is greatly appreciated.

- Craig


Fred Taylor

unread,
Feb 2, 2009, 8:03:23 PM2/2/09
to
If you can have the field as readonly in the grid, you can use:

grid.Column[x].ControlSource ="PADL(TRIM(MyData),9)"
grid.Column[x].Format = "@R XXXXXX-XX-X"

--
Fred

"Alex.K" <nom...@nomail.com> wrote in message
news:%23pMih1V...@TK2MSFTNGP04.phx.gbl...

Bernhard Sander

unread,
Feb 3, 2009, 6:09:32 AM2/3/09
to
Hi Craig,

it may help if you change the font of the column from proportional (like Arial)
to non proportional font (like Courier)

Maybe you also change column.alignment or column.textbox1.alignment to some
right bound values.

Regards
Bernhard Sander

Alex.K

unread,
Feb 3, 2009, 6:17:19 PM2/3/09
to
Hey Fred,

The ControlSource option worked great. Thank You!

- Craig

"Fred Taylor" <fta...@mvps.org!REMOVE> wrote in message
news:OUIqfpZh...@TK2MSFTNGP06.phx.gbl...

Alex.K

unread,
Feb 3, 2009, 6:19:16 PM2/3/09
to
Hi Bernhard,

Thanks for you assistance. I was already using the alignment for both.
Fred's suggestion worked great.

Thanks again!

- Craig

"Bernhard Sander" <fu...@no.spam> wrote in message
news:eUGyg$ehJHA...@TK2MSFTNGP06.phx.gbl...

0 new messages