Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 1.0
This is the forum to discuss the Wrox book Beginning ASP.NET 1.0 with C# by Chris Goode, John Kauffman, Christopher L. Miller, Neil Raybould, S. Srinivasa Sivakumar, Dave Sussman, Ollie Cornes, Rob Birdwell, Matt Butler, Gary Johnson, Ajoy Krishnamoorthy, Juan T. Llibre, Chris Ullman; ISBN: 9780764543708
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 1.0 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
  #1 (permalink)  
Old April 11th, 2006, 10:52 AM
Authorized User
 
Join Date: Jul 2004
Location: St. John\'s, NL, Canada.
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Default DataGrid...

Hello,
I have a datagrid in which I click a user's name and get a another datagrid
(DG2) displaying all records for that individual user. In DG2 I need to check
the Due Date colunm to ensure due dates are correctly if not I write out to
the screen a little message. My problem is when I select teh due date column
I get the column header has well, but I only need the contains of the cells
NOT the header.
My code for this routine is:
 Sub SetDueDateColor(ByVal s As Object, ByVal e As DataGridItemEventArgs)

        Dim strSQL, strDate As String
        Dim datNowDate, datDueDate, datReturnDate As DateTime

        datDueDate = e.Item.Cells(7).Text

        If Now.DayOfWeek = DayOfWeek.Tuesday Then
            datNowDate = Now.AddDays(7)

            If strSQL > strDate Then
                Response.Write("Due date is Over")
            Else
                Response.Write("Due date is fine")
            End If
        End If

    End Sub


On the line "datDueDate = e.Item.Cells(7).Text", the column header "DUE" is
not a date, so I get an error.
Is there a way for NOT selecting the column header? Or another way of doing
this?
Thanks in advance!
MGR





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
User COntrol Datagrid inside datagrid rodmcleay ASP.NET 1.0 and 1.1 Professional 3 April 14th, 2007 10:11 AM
Creating DataGrid In Repeater/DataGrid liduwan ASP.NET 1.0 and 1.1 Professional 9 March 6th, 2007 03:31 PM
datagrid ajaidass ADO.NET 2 March 1st, 2007 05:36 PM
Need help regarding datagrid ngsharmila .NET Framework 1.x 1 February 1st, 2006 12:55 AM





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