Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 13th, 2005, 05:49 AM
Authorized User
 
Join Date: Mar 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to lamdog
Default Format Datagrid column

Hi,
   So far I have noticed that the datagrid column are bound and it can be formatted using the BoundColumn property. I bind my data during the execution of the application.
   I would like to format a datetime column with only date. Would appreciate if anyone can shed a light while I keep searching.
   Thanx.

Regards
 
Old March 13th, 2005, 06:43 AM
Authorized User
 
Join Date: Mar 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to lamdog
Default

I have found the solution...cheers...
 
Old March 22nd, 2005, 02:59 PM
Registered User
 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am having the same issue could you let me know what worked for you, please?

Thank you
 
Old March 22nd, 2005, 09:30 PM
Authorized User
 
Join Date: Mar 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to lamdog
Default

Hi lms27,
   I eventually format the date that I extract in my SQL Statement. This what I wrote "CONVERT(char(10), reg_date, 103) AS 'Registration Date'". Hope this helps.
   Btw, any chance u know how to format the width & height of the datagrid during execution/run time?

cheers...
 
Old March 23rd, 2005, 09:37 AM
Registered User
 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Got it to work. I used this in my asp code for the column DataFormatString="{0:d}"

As for the width and height at run time I have no experience with that but from a quick search found something that might be useful:

http://msdn.microsoft.com/library/de...tml/vb04a7.asp








Similar Threads
Thread Thread Starter Forum Replies Last Post
How to fit all column in 1 page in excel format? awiezzz Classic ASP Components 2 February 23rd, 2011 01:42 PM
how to DataGridTextBoxColumn to format the column brad-jenny General .NET 3 September 7th, 2007 03:37 PM
find character % and format column paul20091968 Excel VBA 0 January 29th, 2007 05:45 AM
How can I format datagrid column as xxxxxx2345 Jackxxx ASP.NET 2.0 Basics 1 January 17th, 2007 03:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.