<%@ Register TagPrefix="it" TagName="TextImage" Src="~/UserControls/TextImage.ascx" %>
<%@ Control Language="vb" CodeBehind="DisplayIssues.ascx.vb" AutoEventWireup="false" Inherits="ASPNET.StarterKit.IssueTracker.DisplayIssues" %>
<P>
	<asp:label id="Label1" runat="server" Font-Bold="True">Issues List </asp:label>&nbsp;</P>
<asp:DataGrid PageSize="20" id="grdIssues" allowpaging="True" BorderColor="White" BorderStyle="None"
	Width="100%" CellPadding="2" AutoGenerateColumns="False" AllowSorting="True" runat="server"
	ForeColor="Black">
	<HeaderStyle ForeColor="Black" CssClass="gridHeader" BackColor="LightBlue"></HeaderStyle>
	<Columns>
		<asp:TemplateColumn SortExpression="Id" HeaderText="ID">
			<HeaderStyle HorizontalAlign="Left" CssClass="gridHeader"></HeaderStyle>
			<ItemStyle CssClass="gridFirstItem"></ItemStyle>
			<ItemTemplate>
				&nbsp;<%# DataBinder.Eval(Container.DataItem, "Id")%>
			</ItemTemplate>
		</asp:TemplateColumn>
		<asp:HyperLinkColumn DataNavigateUrlField="Id" DataNavigateUrlFormatString="~/Issues/IssueDetail.aspx?id={0}"
			DataTextField="Title" SortExpression="Title" HeaderText="Issue (click title to view details)">
			<HeaderStyle HorizontalAlign="Left" CssClass="gridHeader"></HeaderStyle>
			<ItemStyle CssClass="gridItem"></ItemStyle>
		</asp:HyperLinkColumn>
		<asp:TemplateColumn Visible="False" SortExpression="Category" HeaderText="Category">
			<HeaderStyle HorizontalAlign="Left" CssClass="gridHeader"></HeaderStyle>
			<ItemStyle HorizontalAlign="Left" CssClass="gridItem"></ItemStyle>
			<ItemTemplate>
				&nbsp;<%# DataBinder.Eval(Container.DataItem, "CategoryName")%>
			</ItemTemplate>
		</asp:TemplateColumn>
		<asp:TemplateColumn Visible="False" SortExpression="Creator" HeaderText="Creator">
			<HeaderStyle HorizontalAlign="Left" CssClass="gridHeader"></HeaderStyle>
			<ItemStyle HorizontalAlign="Left" CssClass="gridItem"></ItemStyle>
			<ItemTemplate>
				&nbsp;<%# DataBinder.Eval(Container.DataItem, "CreatorDisplayName")%>
			</ItemTemplate>
		</asp:TemplateColumn>
		<asp:TemplateColumn Visible="False" SortExpression="Owner" HeaderText="Owner">
			<HeaderStyle HorizontalAlign="Left" CssClass="gridHeader"></HeaderStyle>
			<ItemStyle HorizontalAlign="Left" CssClass="gridItem"></ItemStyle>
			<ItemTemplate>
				&nbsp;<%# DataBinder.Eval(Container.DataItem, "OwnerDisplayName")%>
			</ItemTemplate>
		</asp:TemplateColumn>
		<asp:TemplateColumn Visible="False" SortExpression="Assigned" HeaderText="Assigned">
			<HeaderStyle HorizontalAlign="Left" CssClass="gridHeader"></HeaderStyle>
			<ItemStyle HorizontalAlign="Left" CssClass="gridItem"></ItemStyle>
			<ItemTemplate>
				&nbsp;<%# DataBinder.Eval(Container.DataItem, "AssignedDisplayName" )%>
			</ItemTemplate>
		</asp:TemplateColumn>
		<asp:TemplateColumn Visible="False" SortExpression="Milestone" HeaderText="Milestone">
			<HeaderStyle HorizontalAlign="Left" CssClass="gridHeader"></HeaderStyle>
			<ItemStyle HorizontalAlign="Left" CssClass="gridItem"></ItemStyle>
			<ItemTemplate>
				&nbsp;
				<it:TextImage id="ctlMilestone" Text='<%# DataBinder.Eval(Container.DataItem, "MilestoneName" )%>' ImageUrl='<%# DataBinder.Eval(Container.DataItem, "MilestoneImageUrl" )%>' ImageDirectory="/Milestone" Runat="Server" />
			</ItemTemplate>
		</asp:TemplateColumn>
		<asp:TemplateColumn Visible="False" SortExpression="Status" HeaderText="Status">
			<HeaderStyle HorizontalAlign="Left" CssClass="gridHeader"></HeaderStyle>
			<ItemStyle HorizontalAlign="Left" CssClass="gridItem"></ItemStyle>
			<ItemTemplate>
				&nbsp;
				<it:TextImage id="ctlStatus" Text='<%# DataBinder.Eval(Container.DataItem, "StatusName" )%>' ImageUrl='<%# DataBinder.Eval(Container.DataItem, "StatusImageUrl" )%>' ImageDirectory="/Status" Runat="Server" />
			</ItemTemplate>
		</asp:TemplateColumn>
		<asp:TemplateColumn Visible="False" SortExpression="Priority" HeaderText="Priority">
			<HeaderStyle HorizontalAlign="Left" CssClass="gridHeader"></HeaderStyle>
			<ItemStyle HorizontalAlign="Left" CssClass="gridItem"></ItemStyle>
			<ItemTemplate>
				&nbsp;
				<it:TextImage id="ctlPriority" Text='<%# DataBinder.Eval(Container.DataItem, "PriorityName" )%>' ImageUrl='<%# DataBinder.Eval(Container.DataItem, "PriorityImageUrl" )%>' ImageDirectory="/Priority" Runat="Server" />
			</ItemTemplate>
		</asp:TemplateColumn>
		<asp:TemplateColumn SortExpression="Created" HeaderText="Created">
			<HeaderStyle HorizontalAlign="Right" CssClass="gridHeader"></HeaderStyle>
			<ItemStyle HorizontalAlign="Right" CssClass="gridLastItem"></ItemStyle>
			<ItemTemplate>
				&nbsp;<%# DataBinder.Eval(Container.DataItem, "DateCreated", "{0:d}")%>
			</ItemTemplate>
		</asp:TemplateColumn>
	</Columns>
	<PagerStyle HorizontalAlign="Center"></PagerStyle>
</asp:DataGrid>
<asp:Label id="lblNoIssues" Visible="false" Runat="Server">No Matching Issues</asp:Label>
<table id="tblOptions" width="100%" visible="false" runat="server">
	<tr>
		<td>
			<asp:LinkButton Text="Select Columns" Runat="server" id="lnkSelectColumns">
		Select Columns</asp:LinkButton>
		</td>
		<td align="right">
			<asp:Label id="lblIssues" Runat="Server">(Sort the results by clicking the column headings)</asp:Label>
		</td>
	</tr>
</table>
<asp:Panel id="pnlSelectColumns" Visible="false" runat="Server">
	<BR>
	<BR>
	<TABLE id="Table1" borderColor="black" cellSpacing="0" cellPadding="4" border="1">
		<TR>
			<TD>
				<asp:CheckBoxList id="lstIssueColumns" Runat="Server" RepeatDirection="Horizontal">
					<asp:ListItem Text="Category" Value="2" />
					<asp:ListItem Text="Creator" Value="3" />
					<asp:ListItem Text="Owner" Value="4" />
					<asp:ListItem Text="Assigned" Value="5" />
					<asp:ListItem Text="Milestone" Value="6" />
					<asp:ListItem Text="Status" Value="7" />
					<asp:ListItem Text="Priority" Value="8" />
					<asp:ListItem Text="Created" Value="9" />
				</asp:CheckBoxList><BR>
				<asp:Button id="btnSave" Runat="server" Text="Save" CssClass="standardText"></asp:Button>&nbsp;&nbsp;
				<asp:Button id="btnCancel" Runat="server" Text="Cancel" CssClass="standardText"></asp:Button></TD>
		</TR>
	</TABLE>
</asp:Panel>
<HR width="100%" SIZE="1">
