PC Review


Reply
Thread Tools Rate Thread

Display format of character columns in a gridview like Access?

 
 
Savvoulidis Iordanis
Guest
Posts: n/a
 
      26th Aug 2008
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

 
Reply With Quote
 
 
 
 
David Wier
Guest
Posts: n/a
 
      26th Aug 2008
What format doesn't work that you have tried for the DataFormatString
property?

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


"Savvoulidis Iordanis" <(E-Mail Removed)> wrote
in message news:C51D02B7-14AF-4345-AB69-(E-Mail Removed)...
>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
>



 
Reply With Quote
 
Savvoulidis Iordanis
Guest
Posts: n/a
 
      27th Aug 2008
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gridview display scientific format instead of string automatically WuBin Microsoft ASP .NET 1 3rd Feb 2009 05:30 PM
How do I display a single character as a word in a GridView? mark4asp Microsoft ASP .NET 0 17th Jan 2007 03:46 PM
ACCESS 97 character display problem =?Utf-8?B?RGVyZWs=?= Microsoft Access 0 1st Sep 2006 02:50 AM
How to display/edit/update/insert new records (non-key columns) in a dynamic gridview? loga123 Microsoft ASP .NET 0 23rd May 2006 09:24 AM
Unicode Character display in Access 2000 =?Utf-8?B?U3lsbw==?= Microsoft Access 0 8th Nov 2004 07:07 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:32 PM.