Solved

dataformatstring for phone number

Posted on 2004-09-14
2
2,961 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

895 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

11 Experts available now in Live!

Get 1:1 Help Now