Link to home
Start Free TrialLog in
Avatar of BOEING39
BOEING39

asked on

HIGHLIGHTING GRIDVIEW ROW DISPLAY ON COLUMN CONDITION

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

Avatar of milindsaraswala
milindsaraswala

You can use  IIF in your grid at aspx page as for example
<tr bgcolor='<%#iif(eval("columnName")>0, "RED","WHITE")%>'>
Avatar of BOEING39

ASKER

Thanks for the response; however, where is the BGcolor code placed in the "gridview" codefile ASPX pag?.   I am getting a messege stating   Also getting Error"BG color attribute is outdated.
OK You can also do something like this. First define two style sheet class in header as follows

.bgred
{
background-color:Red
}

.bgwhite
{
background-color:white
}

and then in grid tr you can use this

<tr class='<%#iif(eval("columnName")>0, bgred, bgwhite)%>'>
I placed  as indicated and I am getting this "erro"r.     AOS = the value I am looking for in the "Reason" column of the data base.  Value is select from dropdown menu.  I want to execute the color change for the "AOS" value in gridview..    


*****************************************************************************************
CSS Header Code:
************************************************************
.style1 {
      border-color: #c0c0c0;
      border-width: 0;
      background-color: #ffffff;
}
.style2 {
      font-size: large;
      text-align: center;
      color: #000080;
      
{
background-color:Red
}

.bgwhite
{
background-color:white
}

*****************************
ASPX PAge
*********************************************************************************************************


</tr>
      </table>
      <table style="width: 1100px" cellpadding="0" cellspacing="0" class="style1" '<%#iif(eval("Reason")=AOS, bgred, bgwhite)%>' align="center">
            <tr>


******************************************************************************************************************************
Compiler Error Message: BC30451: Name 'AOS' is not declared.
*****************************************************************************************************************************


Source Error:

 

Line 131:            </tr>
Line 132:      </table>
Line 133:      <table style="width: 1100px" cellpadding="0" cellspacing="0" class="style1" '<%#iif(eval("Reason")=AOS.text, bgred, bgwhite)%>' align="center">

 


Some mistake you did in your code. You did not declare style sheet properly. It should be like this. You have forget .bgred in your code.

.bgred
{
background-color:Red
}

.bgwhite
{
background-color:white
}


Next thing put code like this in grid. You have put double quotes before and after AOS as it is string type.

 


Let me know did it work or not.
Ok will give that a try.  Also the CSS style code, should that go under style #1 or #2?
no it is separate class so you just copy my below code after closing } of style2
<B>
.bgred
{
background-color:Red
}

.bgwhite
{
background-color:white
}
</B>
no it is separate class so you just copy my below code after closing } of style2

.bgred
{
background-color:Red
}

.bgwhite
{
background-color:white
}
Receiving error and it is not liking  the tag style.   <B>.....

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


Compiler Error Message: BC30451: Name 'bgred' is not declared.

Source Error:

 

Line 136:            </tr>
Line 137:      </table>
Line 138:             <table style="width: 1100px" cellpadding="0" cellspacing="0" class="style1"><tr class='<%#iif(eval("Reason")="AOS", bgred, bgwhite)%>' align="center">
Line 139:
Line 140:                  <td class="style10"><span class="style18">To delete item use
 








*****************************************************
.style2 {
      font-size: large;
      text-align: center;
      color: #000080;
}      

<B>
.bgred
{
background-color:Red
}

.bgwhite
{
background-color:white
}
</B>

}
.style10
Hey sorry actually you can see By mistake I put copy my below code after closing } of style2


.bgred
{
background-color:Red
}

.bgwhite
{
background-color:white
}


Next thing put code like this in grid.


  align="center">


really sorry I make mistake in my previous codes. Hope this should work out :)
Still getting error message:   Compiler Error Message: BC30451: Name 'bgred' is not declared.


"error line 135 ""bgred not declared"

Line 135:             <table style="width: 1100px" cellpadding="0" cellspacing="0" class="style1"><tr class='<%#iif(eval("Reason")="AOS", bgred, bgwhite)%>' align="center">


**********************************************************
CSS Code

<style type="text/css">
.style1 {
      border-color: #c0c0c0;
      border-width: 0;
      background-color: #ffffff;
}
.style2 {
      font-size: large;
      text-align: center;
      color: #000080;
}      

}
.bgred
{
background-color:Red
}

.bgwhite
{
background-color:white

}
.style10
      text-align: left;
}






You did not see my corrected codes i removed single quote from my code. I am putting again code


  align="center">


Just read code above and do the same
I placed code your code as indicated.  IIF "attribute required single quatations surrounding statement in XHTML as below.......  When testing I do not receive error messages any longer; however color doesn't change......in Gridview.



<table style="width: 1100px" cellpadding="0" cellspacing="0" class="style1">
<tr class='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' align="center">


Just copy your Gridview code over here. If you are doing any mistake I will check and send you change code.
Thx Here is the code:

<!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;
}      
.bgred
{
background-color:Red
}
.bgwhite
{
background-color:white
}

.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"><tr class= "<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>" align="center">


                  <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>

<!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;
}	
.bgred
{
background-color:Red
}
.bgwhite
{
background-color:white
}

.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"><tr class= "<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>" align="center">


			<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

First of all your code is outside the Grid View and I had just gave you logic how to do it. Now you have to remove following line on 132

" align="center">

and also remove following line 340 and 341

      

You have to add following code inside the grid view this is just example one the label in grid view. You have to do in all the label in grid view

CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' Text='<%# Bind("Parts") %>' id="Label5">
Sorry again mistake again mistake

Changes as follows ..................

First of all your code is outside the Grid View and I had just gave you logic how to do it. Now you have to remove following line on 132

" align="center">

and also remove following line 340 and 341

      

You have to add following code inside the grid view this is just example one the label in grid view. You have to do in all the label in grid view

I deleted lines as request....   I understand  this code goes in Gridview; however, does ithe code go in as Template field or another field type under reason?

<ItemTemplate>
                                                <asp:Label runat="server" Text='<%# Bind("Reason") %>' id="Label1">
                                                <asp:Label runat="server" CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' Text='<%# Bind("Parts") %>' id="Labe15"/>
                                                </asp:Label>
                                          </ItemTemplate>
                                          <ItemStyle HorizontalAlign="Left" Wrap="False" Width="150px" />
                                    </asp:templatefield>
No Dear,

again you are miss interpreting me.

So just replace below code with gridview and try it.


<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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 ItemStyle-BackColor='<%#iif(eval("Reason")="AOS", "red", "white")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 ItemStyle-BackColor='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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>

Open in new window

now getting:

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Databinding expressions are only supported on objects that have a DataBinding event. System.Web.UI.WebControls.BoundField does not have a DataBinding event.

Source Error:


Line 160:                                          <ItemStyle HorizontalAlign="Center" Wrap="False" Width="60px" />
Line 161:                                    </asp:templatefield>
Line 162:                                    <asp:boundfield ItemStyle-BackColor='<%#iif(eval("Reason")="AOS", "red", "white")%>' DataField="ArrTime" DataFormatString="{0:hh:mm.FF tt}" HeaderText="ArrTime" SortExpression="ArrTime">
Line 163:                                          <ItemStyle HorizontalAlign="Center" Wrap="False" Width="60px" />
Line 164:                                    </asp:boundfield>
 
Check this.
<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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 ItemStyle-BackColor='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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>

Open in new window

By the way I appreciate your patience.   The last code had similar issues; however, the attached code does highlight "AOS" however, is impacting the "Reason" column .   I am getting blank boxes ect.  Please see attached.   I am trying to get this function working for next week.  I plan to re-due with code behind when I have a chance.   I changed the Label to the "Reason Line"   which is Line 190.   I have attached a word file showing what is happeng.


<!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;
}      
.bgred
{
background-color:Red
}
.bgwhite
{
background-color:white
}

.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">


                  <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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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>
            
      </table>
</form>

</body>

</html>

Open in new window

test1.doc
Just at a glance I think the background and font are the issue in the CSS.   Under the condition should it be affectingthe other rows that don't meet the condition "AOS"...?
Check this out and reply me soon as I wanted to go for Bed. It's 3 am so I wanted to sleep
<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:templatefield HeaderText="Ship" SortExpression="Ship">
					<ItemTemplate>
                                                <asp:Label CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>'runat="server" Text='<%# Bind("Ship") %>' id="Label6">
                                                </asp:Label>
                                          </ItemTemplate>
                                          <ItemStyle HorizontalAlign="Center" Wrap="False" Width="40px" />
				    </asp:templatefield>
                                    <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:templatefield HeaderText="ArrTime" SortExpression="ArrTime">
					<ItemTemplate>
                                                <asp:Label CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>'runat="server" Text='<%# Bind("ArrTime", "{0:hh:mm.FF tt}") %>' id="Label6">
                                                </asp:Label>
                                          </ItemTemplate>
                                          <ItemStyle HorizontalAlign="Center" Wrap="False" Width="60px" />
				    </asp:templatefield>
                                    <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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' runat="server" Text='<%# Bind("DepDate", "{0:MM/dd/yyyy}") %>' id="Label7">
                                                </asp:Label>
                                          </ItemTemplate>
                                          <ItemStyle HorizontalAlign="Center" Wrap="False" Width="60px" />
                                    </asp:templatefield>
				    <asp:templatefield HeaderText="DepTime" SortExpression="DepTime">
					<ItemTemplate>
                                                <asp:Label CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>'runat="server" Text='<%# Bind("DepTime","{0:MM/dd/yyyy}") %>' id="Label6">
                                                </asp:Label>
                                          </ItemTemplate>
                                          <ItemStyle HorizontalAlign="Center" Wrap="False" Width="60px" />
				    </asp:templatefield>
                                    <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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' 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 CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>' runat="server" Text='<%# Bind("EtrDate", "{0:MM/dd/yyyy}") %>' id="Label8">
                                                </asp:Label>
                                          </ItemTemplate>
                                          <ItemStyle HorizontalAlign="Center" Wrap="False" Width="60px" />
                                    </asp:templatefield>
				    <asp:templatefield HeaderText="ETR Time" SortExpression="ETRTime">
					<ItemTemplate>
                                                <asp:Label CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>'runat="server" Text='<%# Bind("ETRTime","{0:MM/dd/yyyy}") %>' id="Label6">
                                                </asp:Label>
                                          </ItemTemplate>
                                          <ItemStyle HorizontalAlign="Center" Wrap="False" Width="80px" />
				    </asp:templatefield>
                              </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>

Open in new window

Ok, go to sleep I will check with you tomorrow.  I need to run to the store.  Again thx for the help thus far and will let you know...

will wait four reply
Tried code and it is saying the server tag is not well formed...
can you send me error snap shot lines which it showing
hey did your problem solved
Just got home.  I will send shortly...

Here is the error


Server Error in '/' Application.
--------------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The server tag is not well formed.

Source Error:


Line 146:                            <asp:templatefield HeaderText="Ship" SortExpression="Ship">
Line 147:                              <ItemTemplate>
Line 148:                                                <asp:Label CssClass='<%#iif(eval("Reason")="AOS", "bgred", "bgwhite")%>'runat="server" Text='<%# Bind("Ship") %>' id="Label6">
Line 149:                                                </asp:Label>
Line 150:                                          </ItemTemplate>
 

Source File: /home/home_data1.aspx    Line: 148

ASKER CERTIFIED SOLUTION
Avatar of milindsaraswala
milindsaraswala

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Did it work or still having problem ??
Partial answer given.  Going to code behind... to resolve.  Assistance was very helpful.