We help IT Professionals succeed at work.
Get Started

HIGHLIGHTING GRIDVIEW ROW DISPLAY ON COLUMN CONDITION

631 Views
Last Modified: 2012-06-27
I have the attached gridview setup with "No Code Behind" and I want certain rows to display in a different color depending on column data diplay.  How would I do I set this up without code behind?
***************************************************************
CONNECTION

**************************************************************
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">

<script runat="server">

    Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim con As New System.Data.OleDb.OleDbConnection
 
        Dim myPath As String
        myPath = Server.MapPath("db2.mdb")
 
        con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data source=" & myPath & ";"
        Dim myCommand As New System.Data.OleDb.OleDbCommand
 
        myCommand.CommandText = "insert into results(Ship,ArrDate,ArrTime,DepDate,DepTime,reason,workload,parts,updated,status,ETRDate,ETRTime) values('" & Ship.Text & "','" & ArrDate.Text & "','" & ArrTime.Text & "','" & DepDate.Text & "','" & DepTime.Text & "','" & Reason.Text & "','" & Workload.Text & "','" & Parts.Text & "','" & Updated.Text & "','" & Status.Text & "','" & ETRDate.Text & "','" & ETRTime.Text & "')"

        myCommand.Connection = con
        con.Open()
        myCommand.ExecuteNonQuery()
        con.Close()
        Response.Redirect("http://las.laxpm.com/HOME/home_data1.aspx")
    End Sub 
</script>

<head runat="server">
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>LAS Critical Workload and AOS Ac</title>
<style type="text/css">
.style1 {
	border-color: #c0c0c0;
	border-width: 0;
	background-color: #ffffff;
}
.style2 {
	text-align: center;
}
.style3 {
	font-family: Arial;
}
.style4 {
	font-size: xx-small;
}
.style5 {
	font-size: xx-small;
	color: #0000FF;
}
</style>
</head>

<body>

<form id="form1" runat="server">
	<input value="0" type="hidden" name="VTI-GROUP" />
	<table style="width: 900px" cellpadding="0" cellspacing="0" class="style1">
		<tr>
			<td class="style2"><br />
			<span class="style3">LAS Critical Workload and AOS Activity</span><br />
			</td>
		</tr>
		<tr>
			<td>
			<table style="width: 900px" cellpadding="0" cellspacing="0" class="style1">
				<tr>
					<td>
					<asp:Button runat="server" Text="Submit" id="btnsubmit" Width="73px" onclick="btnSubmit_Click" /> 
					&nbsp;</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
				</tr>
			</table>
			</td>
		</tr>
	</table>
	<table style="width: 900px" cellpadding="0" cellspacing="0" class="style1">
		<tr>
			<td class="style3" style="width: 233px">Ship:</td>
			<td class="style3" style="width: 435px">
			<asp:TextBox runat="server" id="Ship" Width="100px"></asp:TextBox>
			<span class="style19">
			&nbsp;</span></td>
			<td class="style3"><asp:RequiredFieldValidator runat="server" ErrorMessage="Enter Ship Number" id="RequiredFieldValidator4"
			ControlToValidate="Ship" Font-Size="X-Small">
			</asp:RequiredFieldValidator>
&nbsp;</td>

			<td class="style3">&nbsp;</td>
		</tr>
		<tr>
			<td class="style3" style="width: 233px">&nbsp;</td>
			<td class="style3" style="width: 435px">&nbsp;</td>
			<td class="style3">&nbsp;</td>
		</tr>
		<tr>
			<td class="style3" style="width: 233px">Arrival Date/Time:</td>
			<td class="style3" style="width: 435px">
			<asp:TextBox runat="server" id="ArrDate"  AutoPostBack="true" Width="100px"></asp:TextBox>
			<a href="javascript:;" onclick="window.open('popup.aspx?textbox=ArrDate','cal','width=250,height=225,left=270,top=180')"><img src="SmallCalendar.gif" border="0" width="16" height="16"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
			<asp:TextBox runat="server" id="ArrTime" Width="100px"></asp:TextBox>
			<span class="style19">
			&nbsp;<span class="style5"> (23:00 format)</span></span></td>
			<td class="style3">
			<asp:RequiredFieldValidator runat="server" ErrorMessage="Enter Arrival Time (format 23:00)" id="RequiredFieldValidator21"
			ControlToValidate="ArrTime" Font-Size="X-Small">
			</asp:RequiredFieldValidator>
			<span class="style4">&nbsp;
			</span></td>
		</tr>
		<tr>
			<td class="style3" style="width: 233px">&nbsp;</td>
			<td class="style3" style="width: 435px">&nbsp;</td>
			<td class="style3"><asp:RequiredFieldValidator runat="server" ErrorMessage="Select Arrival Date" id="RequiredFieldValidator12"
			ControlToValidate="ArrDate" Font-Size="X-Small">
			</asp:RequiredFieldValidator>
	&nbsp;</td>
		</tr>
		<tr>
			<td class="style3" style="width: 233px">Departure Date/Time:</td>
			<td class="style3" style="width: 435px">
			<asp:TextBox runat="server"  AutoPostBack="true" id="DepDate" Width="100px"></asp:TextBox>
			<a href="javascript:;" onclick="window.open('popup.aspx?textbox=DepDate','cal','width=250,height=225,left=270,top=180')"><img src="SmallCalendar.gif" border="0" width="16" height="16"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
			<asp:TextBox runat="server" id="DepTime" Width="100px"></asp:TextBox>
			<span class="style19">
			&nbsp; <span class="style5">(23:00 format)</span></span></td>
			<td class="style3">
			<asp:RequiredFieldValidator runat="server" ErrorMessage="Enter Departure Time (format 23:00)" id="RequiredFieldValidator22"
			ControlToValidate="DepTime" Font-Size="X-Small">
			</asp:RequiredFieldValidator>
			&nbsp;</td>

			
		</tr>
		<tr>
			<td class="style3" style="width: 233px">&nbsp;</td>
			<td class="style3" style="width: 435px">&nbsp;</td>
			<td class="style3"><asp:RequiredFieldValidator runat="server" ErrorMessage="Select Departure Date" id="RequiredFieldValidator11"
			ControlToValidate="DepDate" Font-Size="X-Small">
			</asp:RequiredFieldValidator>
&nbsp;</td>
		</tr>
		<tr>
			<td class="style3" style="width: 233px">Reason:</td>
			<td class="style3" style="width: 435px">
			<asp:DropDownList runat="server" id="Reason" Width="246px" Height="22px" DataValueField="Reason" DataTextField="Reason" DataSourceID="AccessDataSource1"></asp:DropDownList>
			<span class="style19">
			</span><asp:AccessDataSource runat="server" ID="AccessDataSource1" DataFile="db2.mdb" SelectCommand="SELECT DISTINCT [Reason] FROM [Droprdown]">
			</asp:AccessDataSource>
			</td>
			<td class="style3"><asp:RequiredFieldValidator runat="server" ErrorMessage="Enter Reason" id="RequiredFieldValidator5"
			ControlToValidate="Reason" Font-Size="X-Small">
			</asp:RequiredFieldValidator>
&nbsp;</td>
			<td class="style3">&nbsp;</td>
		</tr>
		<tr>
			<td class="style3" style="width: 233px">&nbsp;</td>
			<td class="style3" style="width: 435px">&nbsp;</td>
			<td class="style3">&nbsp;</td>
		</tr>
		<tr>
			<td class="style3" style="width: 233px">Workload AOS Description:</td>
			<td class="style3" style="width: 435px">
			<asp:TextBox Wrap="True" Runat="server" id="Workload" TextMode="MultiLine" Width="389px" Height="63px"></asp:TextBox> 
			<span class="style19">
			&nbsp;</span></td>
			<td class="style3"><asp:RequiredFieldValidator runat="server" ErrorMessage="Enter Workload Data" id="RequiredFieldValidator6"
			ControlToValidate="Workload" Font-Size="X-Small">
			</asp:RequiredFieldValidator>&nbsp;</td>

		</tr>
		<tr>
			<td class="style3" style="width: 233px; height: 16px;"></td>
			<td class="style3" style="width: 435px; height: 16px;"></td>
			<td class="style3" style="height: 16px"></td>
		</tr>
		<tr>
			<td class="style3" style="width: 233px">Parts/Tooling Requirements:</td>
			<td class="style3" style="width: 435px">
			<asp:TextBox Wrap="True" Runat="server" id="Parts" TextMode="MultiLine" Width="389px" Height="63px"></asp:TextBox> 
			</td>
			<td class="style3"><asp:RequiredFieldValidator runat="server" ErrorMessage="Enter Parts Data" id="RequiredFieldValidator7"
			ControlToValidate="Parts" Font-Size="X-Small">
			</asp:RequiredFieldValidator>&nbsp;</td>
		</tr>
		<tr>
			<td class="style3" style="width: 233px">&nbsp;</td>
			<td class="style3" style="width: 435px">&nbsp;&nbsp;</td>
			<td class="style3">&nbsp;</td>
		</tr>
		<tr>
			<td class="style3" style="width: 233px">Updated By:</td>
			<td class="style3" style="width: 435px">
			<asp:DropDownList runat="server" id="Updated" Width="246px" Height="22px" DataValueField="Leads" DataTextField="Leads" DataSourceID="AccessDataSource2">
			</asp:DropDownList>
			<asp:AccessDataSource runat="server" ID="AccessDataSource2" DataFile="db2.mdb" SelectCommand="SELECT DISTINCT [Leads] FROM [Droprdown]">
			</asp:AccessDataSource>
			</td>
			<td class="style3"><asp:RequiredFieldValidator runat="server" ErrorMessage="Select Updated By" id="RequiredFieldValidator8"
			ControlToValidate="Updated" Font-Size="X-Small">
			</asp:RequiredFieldValidator>&nbsp;</td>
		</tr>
		<tr>
			<td class="style3" style="width: 233px">&nbsp;</td>
			<td class="style3" style="width: 435px">&nbsp;</td>
			<td class="style3">&nbsp;</td>
		</tr>
		<tr>
			<td class="style3" style="width: 233px">Status:</td>
			<td class="style3" style="width: 435px">
			<asp:DropDownList runat="server" id="Status" Width="97px" Height="22px" DataValueField="Status" DataTextField="Status" DataSourceID="AccessDataSource3">
			</asp:DropDownList>
			<asp:AccessDataSource runat="server" ID="AccessDataSource3" DataFile="db2.mdb" SelectCommand="SELECT DISTINCT [Status] FROM [Droprdown]">
			</asp:AccessDataSource>
			&nbsp;</td>
			<td class="style3"><asp:RequiredFieldValidator runat="server" ErrorMessage="Select Status" id="RequiredFieldValidator9"
			ControlToValidate="Status" Font-Size="X-Small">
			</asp:RequiredFieldValidator>&nbsp;</td>
		</tr>
		<tr>
			<td class="style3" style="width: 233px">&nbsp;</td>
			<td class="style3" style="width: 435px">&nbsp;</td>
			<td class="style3"><asp:RequiredFieldValidator runat="server" ErrorMessage="Select ETR Date" id="RequiredFieldValidator15"
			ControlToValidate="ETRDate" Font-Size="X-Small">
			</asp:RequiredFieldValidator>
			&nbsp;</td>
		</tr>
		<tr>
			<td class="style3" style="width: 233px">ETR: Date/Time</td>
			<td class="style3" style="width: 435px">
			<asp:TextBox runat="server" id="ETRDate" Width="100px"></asp:TextBox>
			<a href="javascript:;" onclick="window.open('popup.aspx?textbox=ETRDate','cal','width=250,height=225,left=270,top=180')"><img src="SmallCalendar.gif" border="0" width="16" height="16"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<asp:TextBox runat="server" id="ETRTime" Width="100px"></asp:TextBox>
			<span class="style19">
			&nbsp;</span></td>
			<td class="style3"><asp:RequiredFieldValidator runat="server" ErrorMessage="Enter Departure Time (format 23:00)" id="RequiredFieldValidator23"
			ControlToValidate="DepTime" Font-Size="X-Small">
			</asp:RequiredFieldValidator>
			&nbsp;</td>
		</tr>
	</table>
	<table style="width: 900px" cellpadding="0" cellspacing="0" class="style1">
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
	</table>
	<br />
	<br />
	<br />
	<br />
	<br />
	<br />
	<br />
	<br />
	<br />
	<br />
	<br />
	<br />
	<br />
	<br />
</form>

</body>

</html>

****************************************************************

GRIDVIEW********************************************************

****************************************************************

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<META HTTP-EQUIV="refresh" CONTENT="350">  
<head runat="server">

<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled 1</title>
<style type="text/css">
.style1 {
	border-color: #c0c0c0;
	border-width: 0;
	background-color: #ffffff;
}
.style2 {
	font-size: large;
	text-align: center;
	color: #000080;
}
.style10 {
	text-align: left;
}
.style11 {
	color: #FF0000;
}
.style12 {
	text-align: center;
}
.style13 {
	font-size: small;
	font-family: Arial;
}
.style15 {
	background-color: #ffffff;
	border-left-color: #c0c0c0;
	border-left-width: 0px;
	border-right-color: #c0c0c0;
	border-right-width: 0px;
	border-top-color: #c0c0c0;
	border-top-width: 0px;
	border-bottom-color: #c0c0c0;
	border-bottom-width: 0;
}
.style16 {
	border-top-style: solid;
	border-top-width: 1px;
}
.style17 {
	font-size: large;
	text-align: left;
	color: #000080;
}
.style18 {
	font-size: small;
	color: #FF0000;
	font-family: Arial;
}
.style19 {
	font-size: large;
	text-align: center;
	color: #000080;
	font-family: Arial;
}
.style20 {
	font-size: small;
	text-align: center;
	color: #FF0000;
	font-family: Arial;
	text-decoration: underline;
}
.style21 {
	font-size: small;
	text-align: center;
	color: #000080;
	font-family: Arial;
}
</style>
</head>

<body>

<form id="form1" runat="server">
	<table style="width: 1100px" cellpadding="0" cellspacing="0" class="style1" align="center">
		<tr>
			<td class="style19"><strong>LAS Critical Workload and AOS Activity 
			Planner&nbsp;&nbsp; </strong></td>
		</tr>
		<tr>
			<td class="style21" style="height: 20px">(Reference Only Document 
			See GMM For Details)</td>
		</tr>
		<tr>
			<td class="style17" style="height: 48px">
		<span class="style11"><strong><span class="style13">Note:&nbsp; All LAS future and current 
		workload exceptions or off scheduled maintenance events must be listed 
		in this table.</span></strong><em><span class="style13">&nbsp;&nbsp; 
			</span> </em></span><span class="style13">This would include 
		but not limited to AOS aircraft, future work such as Scheduled Engine Changes, &quot;Road Trips&quot; 
		and &quot;specialized work&quot;.&nbsp;  
		Ensure the information listed is accurate and up to date and include 
		specific part numbers, specialized tooling and personnel such as 
		inspection requirements.&nbsp; Information listed must be updated daily 
		by each shift.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></td>
		</tr>
		<tr>
			<td class="style17">
		&nbsp;</td>
		</tr>
		<tr>
			<td class="style20">
		<strong>** Note:&nbsp; Prior to closing any item - Ensure corrective 
		action is properly documented under work progress.&nbsp; **</strong></td>
		</tr>
		<tr>
			<td class="style2" style="height: 20px"></td>
		</tr>
		<tr>
			<td class="style2">
		<strong>
					&nbsp;&nbsp;&nbsp;<asp:Button runat="server" Text="Add Item" id="Button6" Width="103px" PostBackUrl="http://las.laxpm.com/home/dataentry.aspx" /></strong>&nbsp;&nbsp;&nbsp;<asp:Button runat="server" Text="History" id="Button1" Width="100px" PostBackUrl="http://las.laxpm.com/home/historyhome_data.aspx" />&nbsp; &nbsp;&nbsp;<asp:Button runat="server" Text="Ship History" id="Button7" Width="100px" PostBackUrl="http://las.laxpm.com/home/HistoryHomeQuerry.aspx" />&nbsp;&nbsp;&nbsp; &nbsp; </td>
		</tr>
	</table>
	<table style="width: 1100px" cellpadding="0" cellspacing="0" class="style1" align="center">
		<tr>
			<td class="style10"><span class="style18">To delete item use 
			Edit/Update 
			- Change status to closed!</span><br />
			<div class="style10">
				<asp:GridView runat="server" id="GridView1" AutoGenerateColumns="False" DataSourceID="AccessDataSource1" DataKeyNames="ID" AllowPaging="True" AllowSorting="True" ShowFooter="True" GridLines="None">
					<RowStyle Font-Names="Arial" Font-Size="8pt" Width="1300px" />
					<Columns>
						<asp:commandfield ShowEditButton="True">
							<ItemStyle HorizontalAlign="Left" Wrap="False" Width="40px" />
						</asp:commandfield>
						<asp:boundfield DataField="Ship" HeaderText="Ship" SortExpression="Ship">
							<ItemStyle HorizontalAlign="Center" Wrap="False" Width="40px" />
						</asp:boundfield>
						<asp:templatefield HeaderText="ArrDate" SortExpression="ArrDate">
							<EditItemTemplate>
								<asp:TextBox runat="server" Text='<%# Bind("ArrDate", "{0:MM/dd/yyyy}") %>' id="ArrDate">
								</asp:TextBox>
								<a href="javascript:;" onclick="window.open('popup.aspx?textbox=ArrDate','cal','width=250,height=225,left=270,top=180')">
								<img src="SmallCalendar.gif" border="0" width="16" height="16"></img></a>
							</EditItemTemplate>
							<ItemTemplate>
								<asp:Label runat="server" Text='<%# Bind("ArrDate", "{0:MM/dd/yyyy}") %>' id="Label6">
								</asp:Label>
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Center" Wrap="False" Width="60px" />
						</asp:templatefield>
						<asp:boundfield DataField="ArrTime" DataFormatString="{0:hh:mm.FF tt}" HeaderText="ArrTime" SortExpression="ArrTime">
							<ItemStyle HorizontalAlign="Center" Wrap="False" Width="60px" />
						</asp:boundfield>
						<asp:templatefield HeaderText="DepDate" SortExpression="DepDate">
							<EditItemTemplate>
								<asp:TextBox runat="server" Text='<%# Bind("DepDate", "{0:MM/dd/yyyy}") %>' id="DepDate">
								</asp:TextBox>
								<a href="javascript:;" onclick="window.open('popup.aspx?textbox=DepDate','cal','width=250,height=225,left=270,top=180')">
								<img src="SmallCalendar.gif" border="0" width="16" height="16"></img></a>
							</EditItemTemplate>
							<ItemTemplate>
								<asp:Label runat="server" Text='<%# Bind("DepDate", "{0:MM/dd/yyyy}") %>' id="Label7">
								</asp:Label>
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Center" Wrap="False" Width="60px" />
						</asp:templatefield>
						<asp:boundfield DataField="DepTime" DataFormatString="{0:MM/dd/yyyy}" HeaderText="DepTime" SortExpression="DepTime">
							<ItemStyle HorizontalAlign="Center" Wrap="False" Width="60px" />
						</asp:boundfield>
						<asp:templatefield HeaderText="Reason" SortExpression="Reason">
							<EditItemTemplate>
								<asp:DropDownList runat="server" id="DropDownList1" Width="184px" Height="31px" SelectedValue='<%# Bind("Reason") %>' DataValueField="Reason" DataTextField="Reason" DataSourceID="AccessDataSource1">
								</asp:DropDownList>
								<asp:AccessDataSource runat="server" ID="AccessDataSource1" DataFile="db2.mdb" SelectCommand="SELECT DISTINCT [Reason] FROM [Droprdown]">
								</asp:AccessDataSource>
								&nbsp;
							</EditItemTemplate>
							<ItemTemplate>
								<asp:Label runat="server" Text='<%# Bind("Reason") %>' id="Label1">
								</asp:Label>
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Left" Wrap="False" Width="150px" />
						</asp:templatefield>
						<asp:templatefield HeaderText="Workload AOS Description &amp; Work Progession Detail" SortExpression="Workload">
							<EditItemTemplate>
								<asp:TextBox id="tb7" rows="5" TextMode="MultiLine" runat="server" Width="275px" Height="85px" Text='<%# Bind("Workload") %>' />
							</EditItemTemplate>
							<ItemTemplate>
								<asp:Label runat="server" Text='<%# Bind("Workload") %>' id="Label4">
								</asp:Label>
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Left" Width="500px" />
						</asp:templatefield>
						<asp:templatefield HeaderText="Parts/Tooling Other Requirements" SortExpression="Parts">
							<EditItemTemplate>
								<asp:TextBox id="tb8" rows="5" TextMode="MultiLine" runat="server" Width="275px" Height="85px" Text='<%# Bind("Parts") %>' />
							</EditItemTemplate>
							<ItemTemplate>
								<asp:Label runat="server" Text='<%# Bind("Parts") %>' id="Label5">
								</asp:Label>
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Left" Width="350px" />
						</asp:templatefield>
						<asp:templatefield HeaderText="Updated" SortExpression="Updated">
							<EditItemTemplate>
								<asp:DropDownList runat="server" id="DropDownList2" DataValueField="Leads" DataTextField="Leads" DataSourceID="AccessDataSource2" Height="31px" Width="184px" SelectedValue='<%# Bind("updated") %>'>
								</asp:DropDownList>
								<asp:AccessDataSource runat="server" ID="AccessDataSource2" DataFile="db2.mdb" SelectCommand="SELECT DISTINCT [Leads] FROM [Droprdown]">
								</asp:AccessDataSource>
								&nbsp;
							</EditItemTemplate>
							<ItemTemplate>
								<asp:Label runat="server" Text='<%# Bind("Updated") %>' id="Label2">
								</asp:Label>
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Center" Wrap="False" Width="150px" />
						</asp:templatefield>
						<asp:templatefield HeaderText="Status" SortExpression="Status">
							<EditItemTemplate>
								<asp:DropDownList runat="server" id="DropDownList3" DataValueField="Status" DataTextField="Status" DataSourceID="AccessDataSource3" SelectedValue='<%# bind("status") %>'>
								</asp:DropDownList>
								<asp:AccessDataSource runat="server" ID="AccessDataSource3" DataFile="db2.mdb" SelectCommand="SELECT DISTINCT [Status] FROM [Droprdown]">
								</asp:AccessDataSource>
								&nbsp;
							</EditItemTemplate>
							<ItemTemplate>
								<asp:Label runat="server" Text='<%# Bind("Status") %>' id="Label3">
								</asp:Label>
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Center" Wrap="False" Width="60px" />
						</asp:templatefield>
						<asp:templatefield HeaderText="EtrDate" SortExpression="EtrDate">
							<EditItemTemplate>
								<asp:TextBox runat="server" Text='<%# Bind("EtrDate", "{0:MM/dd/yyyy}") %>' id="EtrDate">
								</asp:TextBox>
								<a href="javascript:;" onclick="window.open('popup.aspx?textbox=ArrDate','cal','width=250,height=225,left=270,top=180')">
								<img src="SmallCalendar.gif" border="0" width="16" height="16"></img></a>
							</EditItemTemplate>
							<ItemTemplate>
								<asp:Label runat="server" Text='<%# Bind("EtrDate", "{0:MM/dd/yyyy}") %>' id="Label8">
								</asp:Label>
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Center" Wrap="False" Width="60px" />
						</asp:templatefield>
						<asp:boundfield DataField="ETRTime" DataFormatString="{0:MM/dd/yyyy}" HeaderText="ETR Time" SortExpression="ETRTime">
							<HeaderStyle Wrap="True" />
							<ItemStyle HorizontalAlign="Center" Wrap="False" Width="80px" />
						</asp:boundfield>
					</Columns>
					<FooterStyle BackColor="Navy" Font-Names="Arial" Font-Size="Small" />
					<PagerStyle BackColor="Navy" Font-Names="Arial" ForeColor="White" />
					<HeaderStyle BackColor="Navy" Font-Names="Arial" Font-Size="Small" ForeColor="White" />
					<EditRowStyle Width="1200px" />
					<AlternatingRowStyle BackColor="Blue" ForeColor="White" />
				</asp:GridView>
			</div>
			<asp:AccessDataSource runat="server" ID="AccessDataSource1" DeleteCommand="DELETE FROM [Results] WHERE [ID] = ?" InsertCommand="INSERT INTO [Results] ([Ship], [ArrDate], [ArrTime], [DepDate], [DepTime], [Reason], [Workload], [Parts], [Updated], [Status], [ETRDate], [ETRTime]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" UpdateCommand="UPDATE [Results] SET [Ship] = ?, [ArrDate] = ?, [ArrTime] = ?, [DepDate] = ?, [DepTime] = ?, [Reason] = ?, [Workload] = ?, [Parts] = ?, [Updated] = ?, [Status] = ?, [ETRDate] = ?, [ETRTime] = ? WHERE [ID] = ?" DataFile="db2.mdb" SelectCommand="SELECT [ID], [Ship], [ArrDate], [ArrTime], [DepDate], [DepTime], [Reason], [Workload], [Parts], [Updated], [Status], [ETRDate], [ETRTime] FROM [Results] WHERE ([Status] = ?) ORDER BY [ArrDate]">
				<SelectParameters>
					<asp:parameter DefaultValue="Open" Name="Status" Type="String" />
				</SelectParameters>
				<DeleteParameters>
					<asp:parameter Name="ID" Type="Int32" />
				</DeleteParameters>
				<UpdateParameters>
					<asp:parameter Name="Ship" Type="String" />
					<asp:parameter Name="ArrDate" Type="DateTime" />
					<asp:parameter Name="ArrTime" Type="String" />
					<asp:parameter Name="DepDate" Type="DateTime" />
					<asp:parameter Name="DepTime" Type="String" />
					<asp:parameter Name="Reason" Type="String" />
					<asp:parameter Name="Workload" Type="String" />
					<asp:parameter Name="Parts" Type="String" />
					<asp:parameter Name="Updated" Type="String" />
					<asp:parameter Name="Status" Type="String" />
					<asp:parameter Name="ETRDate" Type="DateTime" />
					<asp:parameter Name="ETRTime" Type="String" />
					<asp:parameter Name="ID" Type="Int32" />
				</UpdateParameters>
				<InsertParameters>
					<asp:parameter Name="Ship" Type="String" />
					<asp:parameter Name="ArrDate" Type="DateTime" />
					<asp:parameter Name="ArrTime" Type="String" />
					<asp:parameter Name="DepDate" Type="DateTime" />
					<asp:parameter Name="DepTime" Type="String" />
					<asp:parameter Name="Reason" Type="String" />
					<asp:parameter Name="Workload" Type="String" />
					<asp:parameter Name="Parts" Type="String" />
					<asp:parameter Name="Updated" Type="String" />
					<asp:parameter Name="Status" Type="String" />
					<asp:parameter Name="ETRDate" Type="DateTime" />
					<asp:parameter Name="ETRTime" Type="String" />
				</InsertParameters>
			</asp:AccessDataSource>
			<br />
			<br />
			<br />
			<br />
			<table style="width: 1100px" cellpadding="0" cellspacing="0" class="style15">
				<tr>
					<td class="style16">&nbsp;</td>
				</tr>
				<tr>
					<td class="style12">&nbsp;</td>
				</tr>
			</table>
			<br />
			<br />
			<br />
			<br />
			<br />
			<br />
			<br />
			<br />
			<br />
			<br />
			<br />
			<br />
			<br />
			<br />
			<br />
			<br />
			<br />
			<br />
			<br />
			</td>
		</tr>
	</table>
</form>

</body>

</html>

Open in new window

Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 34 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE