dataformatstring for phone number

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=""/>
GeznaAsked:
Who is Participating?
 
David H.H.LeeConnect With a Mentor Commented:
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
 
GeznaAuthor Commented:
thanks! I knew I could find it if I looked hard enough, but I just didn't have time
0
All Courses

From novice to tech pro — start learning today.