Donnie4572
asked on
CSS Style Sheet
I have web app. VB.Net. Four controls on aspx page. Sqlconnection, Dataadapter, Dataset, and Datagrid. The data on the grid is from sql2000 and each record has a date assigned to it. Each record represents appointment made by customer. I need the record s from the past to show up as the color red.
Example: If appointment is made for today 11/10/2004
Then on 11/11/2004, on the grid, turn that record red.
Thanks,
Donnie
Example: If appointment is made for today 11/10/2004
Then on 11/11/2004, on the grid, turn that record red.
Thanks,
Donnie
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Well it turns out this does work.
If mycol = "10/15/2004 9:00:00 AM" Then
The problem was 10/15/2004 09:00:00 AM I suppose the 09 needed to 9 since it was converted to string.
Will award points for effort
Donnie
If mycol = "10/15/2004 9:00:00 AM" Then
The problem was 10/15/2004 09:00:00 AM I suppose the 09 needed to 9 since it was converted to string.
Will award points for effort
Donnie
ASKER
Ok, this code works only I can't get it to work with datetime column. Can someone show me how to use this code for my datetime field?
<asp:datagrid id="datagrid1" runat="server" OnItemDataBound="myformatr
Protected Sub myformatrow(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingIt
Dim mycol As String = Convert.ToString(e.Item.Ce
If mycol = "mydata" Then
e.Item.ForeColor = Color.Red
End If
End If
End Sub
Thanks,
Donnie