Solved

dataformatstring for phone number

Posted on 2004-09-14
2
2,960 Views
Last Modified: 2007-12-19
Hi,

What is the dataformatstring property supposed to like for a phone number on a bound column in a datagrid? T

The format I need is (###) ###-####

<asp:BoundColumn HeaderText="Phone" Visible="True" DataField="intPhoneNumber" ItemStyle-Width="60" readOnly="True" ItemStyle-HorizontalAlign="Center" DataFormatString=""/>
0
Comment
Question by:Gezna
2 Comments
 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 500 total points
ID: 12056886
Gezna ,
Try this :
<asp:BoundColumn HeaderText="Phone" Visible="True" DataField="intPhoneNumber" ItemStyle-Width="60" readOnly="True" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:(###) ###-####}"/>

Check this article :
-http://aspnet.4guysfromrolla.com/articles/041702-1.2.aspx
0
 

Author Comment

by:Gezna
ID: 12057077
thanks! I knew I could find it if I looked hard enough, but I just didn't have time
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now