473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

DataGrid Cell selection

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

Apr 11 '06 #1
0 1097

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Terry | last post by:
Hey, Having somewhat of an issue, I have a datagrid which is giving me issues. The Datagrid is setup for the user to double click the row, the row is selected and data within that row populates a...
2
by: Chris Plowman | last post by:
Hi all, I was wondering if anyone can help me with a really annoying problem I have been having. I made a derived datagrid class that will select the row when a user clicks anywhere on a cell...
3
by: PeterZ | last post by:
G'day, After doing much searching and pinching bits of ideas from here there and everywhere I came up with a fairly 'clean' solution of including a comboBox into a dataGrid column. You can...
2
by: Wayne | last post by:
I have a datagrid on my windows form, it needs to be read only and when a user selects a row, I want the whole row to be selected. How would I go about doing this? -- Thanks Wayne Sepega...
13
by: pmcguire | last post by:
I have a DataGrid control for which I have also created several new extended DataGridColumnStyles. They behave pretty nicely, but I can't figure out how to implement Selected Item formatting for...
15
by: glenn | last post by:
Hi folks, I have a DropDownList in a DataGrid that is populated from records in a database. I want to add a value that might be a string such as "Select a Company" for the first item since an...
1
by: Hemant Pathak | last post by:
Hi...........PM i m using Vb.6.0 n Datagrid.when i make the focus on ant cell of the datagrid the cell is automaticlly get selected but i want to remove the selection of the text in the cell by...
0
by: jaeden99 | last post by:
I have created a datagrid filled with information from the database. When a user clicks on a particular cell (this cell contains drive letter and file name), I would like to be able to open the...
0
by: =?Utf-8?B?Q2hyaXNK?= | last post by:
I am using a datagrid as a selection list on a form. There is an OK button which closes the form and returns the current selection. I would like to get a doubleclick to perform the same action...
0
by: Winfried Wille | last post by:
Hallo, i have a wpf project using nt 3.5sp1 and the ctp from the datagrid(downloaded thewpftoolkit from codeplex.com), silverlight final downloads are installed to. Wpf datagrid ctp cell...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.