ASP.NET GridView Column - formatting telephone number -


I am adding a column in the code-back to my gridview as follows:

 < Code> field = new boundfield (); Field.HeaderText = "Phone Number"; Field.DataField = "phone number"; Field.HtmlEncode = false; Field.DataFormatString = "{0: ### - ### - ####}"; GridView.Columns.Add (area); However, DataFormatString is not working because the PhoneNumber field is a string, not a numerical DataFormatString in order to keep in mind what is there anyway, or before I get this point Need to change data type before reaching? 

It's difficult to format 'manually' in the grid's robotabout event.


Comments

Popular posts from this blog

email - PHP mail error ... failed to open stream : permission denied -

c# - ListView onScroll event -

c - Linux mmap() error -