Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Tue, 26 Aug 2008 04:50:00 -0700,    group: microsoft.public.dotnet.framework.aspnet        back       


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 DataformatString properly.

TIA
date: Tue, 26 Aug 2008 04:50:00 -0700   author:   Savvoulidis Iordanis

Re: Display format of character columns in a gridview like Access?   
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"  wrote 
in message news:C51D02B7-14AF-4345-AB69-B3DBA08E25B6@microsoft.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 DataformatString properly.
>
> TIA
>
date: Tue, 26 Aug 2008 10:45:33 -0500   author:   David Wier

Re: Display format of character columns in a gridview like Access?   
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
date: Tue, 26 Aug 2008 16:19:00 -0700   author:   Savvoulidis Iordanis

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us