How can I display a 9 digit zipcode in a Datagrid with a hypen

J

Jeff Thur

The ZipCode column in my database is a 9 digit code with
no hypen between position 5 and 6 (eg: 123456789) I need
the user to see the results in the datagrid as 12345-
6789. How can this be accomplished. Thanks for any help.
 
A

Alvin Bruney [MVP]

handler the itemdatabound event, find the cell and either apply a regular
expression to the text or insert a hyphen at the specified position

--
Regards,
Alvin Bruney [Microsoft MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ http://www.lulu.com/owc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top