|
<%@ Page language="c#" Codebehind="tabular.aspx.cs" AutoEventWireup="false" Inherits="ASPNET.StarterKit.Reports.Tabular" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Tabular</title>
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<link href="<%= _styleSheet %>" type=text/css rel=stylesheet>
<script src="scripts.js"></script>
</HEAD>
<body class="Report" leftMargin="0" topMargin="0" marginwidth="0" marginheight="0">
<form id="Tabular" method="post" runat="server">
<table border="0" cellpadding="5" cellspacing="15" width="100%">
<tr>
<td class="ReportTitle">Products By Category</td>
<td align="right"><asp:HyperLink id="PrintButton" NavigateUrl="javascript:Print()" CssClass="printbutton" runat="server" Visible="False">Print</asp:HyperLink></td>
</tr>
</table>
<asp:datalist id="CategoriesList" runat="server" RepeatDirection="Vertical" repeatcolumns="1" Width="100%" CellPadding="5" cellspacing="15">
<itemtemplate>
<table border="0" cellpadding="3" cellspacing="0" class="Content" width="100%">
<tr>
<td valign="top" class="CategoryHeader">
Category
<%# DataBinder.Eval(Container.DataItem, "CategoryName") %>
</td>
</tr>
<tr>
<td>
<asp:datagrid id=Datagrid1 runat="server" autogeneratecolumns="False" DataSource='<%# GetDetails((int)DataBinder.Eval(Container.DataItem, "CategoryID")) %>' OnItemDataBound="CalculateExtendedPrice" BorderWidth="0" GridLines="None" AllowSorting="true" OnSortCommand="SortGrid" Width="100%">
<columns>
<asp:boundcolumn DataField="ProductName" HeaderText="Product" SortExpression="ProductName" ItemStyle-CssClass="ItemStyle" HeaderStyle-CssClass="ProductHeader" ItemStyle-Width="200"></asp:boundcolumn>
<asp:boundcolumn DataField="UnitsInStock" HeaderText="Units In Stock" ItemStyle-CssClass="ItemStyleRight" HeaderStyle-CssClass="ProductHeaderRight" SortExpression="UnitsInStock"></asp:boundcolumn>
<asp:templatecolumn>
<itemtemplate>
<img src="images/spacer.gif" width="70" height="1" />
</itemtemplate>
</asp:templatecolumn>
<asp:boundcolumn DataField="QuantityPerUnit" HeaderText="Quantity Per Unit" ItemStyle-CssClass="ItemStyle" HeaderStyle-CssClass="ProductHeader"></asp:boundcolumn>
<asp:boundcolumn DataField="UnitPrice" HeaderText="Unit Price" ItemStyle-CssClass="ItemStyleRight" HeaderStyle-CssClass="ProductHeaderRight" SortExpression="UnitPrice"></asp:boundcolumn>
<asp:boundcolumn HeaderText="Extended Price" ItemStyle-CssClass="ItemStyleRight" HeaderStyle-CssClass="ProductHeaderRight"></asp:boundcolumn>
</columns>
</asp:datagrid>
</td>
</tr>
<tr>
<td class="CategoryFooter">
Total Units in Stock:
<%# DataBinder.Eval(Container.DataItem, "TotalInStock") %>
</td>
</tr>
</table>
</itemtemplate>
<headerstyle cssclass="ReportTitle"></headerstyle>
</asp:datalist>
</form>
</body>
</HTML>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.