Solved

dataformatstring for phone number

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

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)…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

773 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