Display format of character columns in a gridview like Access?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?U2F2dm91bGlkaXMgSW9yZGFuaXM=?=

    Display format of character columns in a gridview like Access?

    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 DataformatStrin g properly.

    TIA

  • David Wier

    #2
    Re: Display format of character columns in a gridview like Access?

    What format doesn't work that you have tried for the DataFormatStrin g
    property?

    David Wier

    http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
    bloated markup


    "Savvoulidi s Iordanis" <SavvoulidisIor danis@discussio ns.microsoft.co mwrote
    in message news:C51D02B7-14AF-4345-AB69-B3DBA08E25B6@mi crosoft.com...
    >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 DataformatStrin g properly.
    >
    TIA
    >

    Comment

    • =?Utf-8?B?U2F2dm91bGlkaXMgSW9yZGFuaXM=?=

      #3
      Re: Display format of character columns in a gridview like Access?

      I tried the following for DataFormatStrin g:

      {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

      Comment

      Working...