Display format of character columns in a gridview like Access?

  • Thread starter Savvoulidis Iordanis
  • Start date
S

Savvoulidis Iordanis

I have a character(15) column filled with numbers, in my SQL database. I need
it to display like it does in Access when I set a format for the column, like
"000-000-000-000-000". How do I display the values the same way in a gridview
column? I can't manage to set the DataformatString properly.

TIA
 
S

Savvoulidis Iordanis

I tried the following for DataFormatString:

{0:00000-00000-00000}
{0:"00000-00000-00000"}
{0:00000\-00000\-00000}
{0:99999-99999-99999}

What I want is to display the character data 123451234512345 as
12345-12345-12345
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top