Template file: Sample1.page
Class file: Sample1.php
Template file: Sample2.page
Class file: Sample2.php
Template file: Sample3.page
Class file: Sample3.php
Template file: Sample4.page
Class file: Sample4.php
Template file: Sample5.page
Class file: Sample5.php

/ActiveControls/Samples/TActiveDataGrid/Sample4.page

<com:TContent ID="body">

<h1>TActiveDataGrid Sample 4</h1>
<h2>Sorting with TActiveDataGrid</h2>

<com:TActiveDataGrid
	Width="700px"
	CellPadding="2"
	ID="DataGrid"
	AutoGenerateColumns="false"
	HeaderStyle.BackColor="black"
	HeaderStyle.ForeColor="white"
	ItemStyle.BackColor="#BFCFFF"
	ItemStyle.Font.Italic="true"
	AlternatingItemStyle.BackColor="#E6ECFF"
	AllowSorting="true"
	OnSortCommand="sortDataGrid">

	<com:TActiveHyperLinkColumn
		SortExpression="title"
		HeaderText="Book Title"
		DataTextField="title"
		DataNavigateUrlField="ISBN"
		DataNavigateUrlFormatString="http://www.amazon.com/gp/product/%s"
		Target="_blank"
		/>
	<com:TActiveBoundColumn
		SortExpression="publisher"
		HeaderText="Publisher"
		DataField="publisher"
		/>
	<com:TActiveBoundColumn
		SortExpression="price"
		ItemStyle.HorizontalAlign="Right"
		ItemStyle.Wrap="false"
		ItemStyle.Font.Italic="false"
		ItemStyle.ForeColor="green"
		HeaderText="Price"
		DataField="price"
		DataFormatString="$%.2f"
		/>
	<com:TActiveCheckBoxColumn
		SortExpression="instock"
		HeaderText="In-stock"
		HeaderStyle.Wrap="false"
		DataField="instock"
		/>
	<com:TActiveTemplateColumn HeaderText="Rating" SortExpression="rating">
		<prop:ItemTemplate>
		<img src="images/star<%#$this->NamingContainer->Data['rating']%>.gif" alt="" />
		</prop:ItemTemplate>
	</com:TActiveTemplateColumn>
</com:TActiveDataGrid>

</com:TContent>