Summary Rows in DataGrid Controls Sample 2

  


‹%@ Page Language="C#" Inherits="BWSLib.MyPage" Src="Summary.cs" Trace="false" %›

‹html›
‹title›Summary Rows‹/title›
‹style›
  a				{behavior:url(..\..\mouseover.htc);}
  hr			{height:2px;color:black;}
  .StdTextBox	{font-family:verdana;font-size:x-small;border:solid 1px black;filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true');}
  .StdText		{font-family:verdana;font-size:x-small;}
‹/style›


‹BODY bgcolor="ivory" style="font-family:verdana;font-size:small"›
‹h2›Orders and Customers‹/h2›
 
‹!-- ASP.NET Form --›
‹form runat="server"›

‹!-- Grid and the remainder of the page --›
‹table›‹tr›
‹td valign="top"›

‹asp:DataGrid id="grid" runat="server" 
	AutoGenerateColumns="false"
	AllowPaging="true" PageSize="15"
	Font-Size = "xx-small"
	CellSpacing="0" CellPadding="4"
	DataKeyField="MyCustomerId"
	BorderStyle="solid" BorderColor="skyblue" BorderWidth="1" GridLines="both"
	OnItemCreated="ItemCreated"
	OnItemDataBound="ItemDataBound"
	OnPageIndexChanged="PageIndexChanged"›
	
	‹headerstyle backcolor="skyblue" font-size="9pt" font-bold="true" /›
	‹itemstyle backcolor="#eeeeee" /›
	‹pagerstyle backcolor="skyblue" font-name="webdings" font-size="10pt" PrevPageText="3" NextPageText="4" /›
	
	‹Columns›
   	   ‹asp:BoundColumn DataField="MyCustomerId" HeaderText="Customer" /›
   	   ‹asp:BoundColumn DataField="MyOrderId" HeaderText="Order #" /›
	   ‹asp:BoundColumn DataField="price" HeaderText="Amount" DataFormatString="{0:c}"›
		‹itemstyle horizontalalign="right" /›
	   ‹/asp:BoundColumn›
	‹/Columns›
‹/asp:DataGrid›

‹/td›
‹td valign="top" width="20px"›‹/td›
‹td valign="top"›
	‹b›Year‹/b›
	‹asp:dropdownlist runat="server" id="ddYears"›
		‹asp:listitem runat="server" ›1998‹/asp:listitem›
		‹asp:listitem runat="server" ›1997‹/asp:listitem›
		‹asp:listitem runat="server" ›1996‹/asp:listitem›
	‹/asp:dropdownlist>
	
	‹asp:linkbutton runat="server" text="Load..." onclick="OnLoadYear" />
	‹br>‹br>
	‹asp:label runat="server" cssclass="StdText" id="lblMsg" />
‹/td>
‹/tr>‹/table>
‹hr>
‹/form>
‹/body>
‹/html›