Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 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 January 11th, 2005, 11:35 AM
Registered User
 
Join Date: Nov 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default c# complex datagrid page

I currently have a page that displays 12 months in the form of bindgrids. I am trying to match the current year so that each of the bindgrids match the date displayed on the page. The current year is 2005 and the bindgrids should only show information relevant to the year 2005. My question is do I change my bindgrids to pull the year (by using convert or cast or changing the string format) and set it equal to the current year?

Also, I have tried to convert, cast and change the stringformat of a column in my db but I only receive errors:

This doesn't seem to work-
Date.Text = String.Format("{0}", (objRead["date"].ToString("{mm/dd/yy}")));


I also have not been successful in using cast or convert. The two columns in my database I have tried to use are of datatype smalldatetime and nvarchar.


Paging will eventually occur to go forward (2006, 2007, etc.) and backward (2004, 2003, etc.)


I'd appreciate anyones help,

K





Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom paging in Datagrid with datagrid page count madhusrp ASP.NET 1.0 and 1.1 Professional 12 June 2nd, 2008 01:15 PM
How to Display an Empty DataGrid on Page Load jigsawcube1 General .NET 1 September 13th, 2007 10:00 PM
datagrid does not display next page vhrao ASP.NET 2.0 Basics 9 July 22nd, 2007 12:28 AM
The page cannot be displayed Datagrid Jose Fidalgo ASP.NET 1.0 and 1.1 Professional 1 September 26th, 2006 06:10 AM
.net and c# complex bindgrid page KarmenC SQL Server 2000 1 January 16th, 2005 04:23 AM





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