<%@ Page Language="C#" Inherits="Telerik.TreeListExamplesCSharp.Accessibility.DefaultCS"CodeFile="DefaultCS.aspx.cs" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ 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" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
<div class="demo-container no-bg">
<telerik:RadTreeList RenderMode="Lightweight" ID="RadTreeList1" runat="server" DataSourceID="SqlDataSource1" ExpandCollapseColumnWidth="5px"
DataKeyNames="LocationID" ParentDataKeyNames="ParentLocationID" PageSize="20" EnableAriaSupport="true"
AutoGenerateColumns="false" AllowPaging="false" AllowMultiItemSelection="true" AllowSorting="true"
Summary="Table containing world locations." >
<PagerStyle ChangePageSizeButtonToolTip="Change Page Size"
ChangePageSizeComboBoxTableSummary="The table which holds the composite controls for the ChangePageSize RadComboBox control."
ChangePageSizeComboBoxToolTip="Change Page Size"
ChangePageSizeTextBoxToolTip="Change Page Size" GoToPageButtonToolTip="Go To Page"
GoToPageTextBoxToolTip="Go To Page" />
<ClientSettings>
<Scrolling AllowScroll="true" UseStaticHeaders="true" />
<Selecting AllowToggleSelection="true" AllowItemSelection="true" />
<ClientMessages ExpandToolTip="Expand" CollapseToolTip="Collapse" />
</ClientSettings>
<Columns>
<telerik:TreeListBoundColumn DataField="LocationID" UniqueName="LocationID" HeaderText="LocationID"
ForceExtractValue="Always" ReadOnly="true" HeaderStyle-Width="30px">
</telerik:TreeListBoundColumn>
<telerik:TreeListBoundColumn DataField="LocationName" UniqueName="LocationName" HeaderText="Name"
HeaderStyle-Width="50px" >
</telerik:TreeListBoundColumn>
<telerik:TreeListNumericColumn DataField="Population" UniqueName="Population" HeaderText="Population"
DataFormatString="{0:#,#0}" HeaderStyle-Width="50px">
</telerik:TreeListNumericColumn>
<telerik:TreeListNumericColumn DataField="Area" UniqueName="Area" HeaderText="Area"
DataFormatString="{0:#,# km<sup>2</sup>}" HeaderStyle-Width="50px" >
</telerik:TreeListNumericColumn>
<telerik:TreeListBoundColumn DataField="ParentLocationID" UniqueName="ParentLocationID"
HeaderText="ParentID" ReadOnly="true" HeaderStyle-Width="50px" ForceExtractValue="Always">
</telerik:TreeListBoundColumn>
<telerik:TreeListButtonColumn UniqueName="DeleteCommandColumn" Text="Delete" CommandName="Delete"
HeaderStyle-Width="50px" HeaderText="Delete column" ButtonType="LinkButton">
</telerik:TreeListButtonColumn>
</Columns>
</telerik:RadTreeList>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString35 %>"
SelectCommand="SELECT [LocationID], [LocationName], [Population], [Area], [ParentLocationID] FROM [WorldLocations]"
DeleteCommand="DELETE FROM [WorldLocations] WHERE [LocationID] = @LocationID"
InsertCommand="INSERT INTO [WorldLocations] ([LocationName], [Population], [Area], [ParentLocationID]) VALUES (@LocationName, @Population, @Area, @ParentLocationID)"
UpdateCommand="UPDATE [WorldLocations] SET [LocationName] = @LocationName, [Population] = @Population, [Area] = @Area, [ParentLocationID] = @ParentLocationID WHERE [LocationID] = @LocationID">
<DeleteParameters>
<asp:Parameter Name="LocationID" Type="Int32"></asp:Parameter>
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="LocationName" Type="String"></asp:Parameter>
<asp:Parameter Name="Population" Type="Int64"></asp:Parameter>
<asp:Parameter Name="Area" Type="Int64"></asp:Parameter>
<asp:Parameter Name="ParentLocationID" Type="Int32"></asp:Parameter>
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="LocationName" Type="String"></asp:Parameter>
<asp:Parameter Name="Population" Type="Int64"></asp:Parameter>
<asp:Parameter Name="Area" Type="Int64"></asp:Parameter>
<asp:Parameter Name="ParentLocationID" Type="Int32"></asp:Parameter>
<asp:Parameter Name="LocationID" Type="Int32"></asp:Parameter>
</UpdateParameters>
</asp:SqlDataSource>
</telerik:RadAjaxPanel>
<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">Validate with WAVE</asp:LinkButton>
</form>
</body>
</html>