<%@ Page Language="vb" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
<title>Telerik ASP.NET Example</title>
<link href="styles.css" rel="stylesheet" />
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
<div class="demo-container no-bg">
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
<telerik:RadTreeList RenderMode="Lightweight" ID="RadTreeList1" runat="server" DataSourceID="SqlDataSource1" AutoGenerateColumns="false" ParentDataKeyNames="ParentLocationID" AllowPaging="true" PageSize="10" DataKeyNames="LocationID" AllowSorting="true" ShowFooter="true">
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<Columns>
<telerik:TreeListBoundColumn DataField="LocationID" UniqueName="LocationID" HeaderText="LocationID">
</telerik:TreeListBoundColumn>
<telerik:TreeListBoundColumn DataField="LocationName" UniqueName="LocationName" HeaderText="LocationName" Aggregate="Count" FooterAggregateFormatString="Count: {0}">
</telerik:TreeListBoundColumn>
<telerik:TreeListNumericColumn DataField="Population" UniqueName="Population" HeaderText="Population" HeaderStyle-Width="200px" DataFormatString="{0:n}" Aggregate="Sum" DataType="System.Double" FooterAggregateFormatString="Sum: {0:n}">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</telerik:TreeListNumericColumn>
<telerik:TreeListNumericColumn DataField="Area" UniqueName="Area" HeaderText="Area" Aggregate="Sum" HeaderStyle-Width="200px" DataFormatString="{0:n} km<sup>2</sup>" DataType="System.Double" FooterAggregateFormatString="Sum: {0:n} km<sup>2</sup>">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</telerik:TreeListNumericColumn>
<telerik:TreeListCalculatedColumn DataFields="Area, Population" Expression="{1} / {0}" HeaderText="Density (Ppl/km<sup>2</sup>)" DataFormatString="{0:n}" Aggregate="Avg" FooterAggregateFormatString="Average: {0:n}">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</telerik:TreeListCalculatedColumn>
<telerik:TreeListBoundColumn DataField="ParentLocationID" UniqueName="ParentLocationID" Visible="false" HeaderText="ParentLocationID"></telerik:TreeListBoundColumn>
</Columns>
</telerik:RadTreeList>
</telerik:RadAjaxPanel>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>" SelectCommand="SELECT [LocationID], [LocationName], [Population], [Area], [ParentLocationID] FROM [WorldLocations]"></asp:SqlDataSource>
</div>
</form>
</body>
</html>