<%@ Page Language="c#" Inherits="Telerik.ListViewExamplesCSharp.DefiningStructure.DeclarativeDefinition.DefaultCS"CodeFile="DefaultCS.aspx.cs" %>
<%@ 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" />
<qsf:MessageBox ID="InfoMessageBox" Type="Info" Icon="Info" runat="server">
The actual data editing logic is omitted for brevity
</qsf:MessageBox>
<div class="demo-container no-bg">
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel runat="server" ID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1">
<telerik:RadListView runat="server" ID="RadListView1" RenderMode="Lightweight" AllowPaging="True" DataKeyNames="CustomerID"
DataSourceID="SqlDataSource1">
<LayoutTemplate>
<div class="RadListView RadListView_<%# Container.Skin %>">
<table class="mainTable">
<thead>
<tr class="rlvHeader">
<th>
</th>
<th>CustomerID
</th>
<th>CompanyName
</th>
<th>ContactName
</th>
<th>ContactTitle
</th>
<th>Address
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="6">
<telerik:RadDataPager RenderMode="Lightweight" ID="RadDataPager1" runat="server">
<Fields>
<telerik:RadDataPagerButtonField FieldType="Numeric"></telerik:RadDataPagerButtonField>
</Fields>
</telerik:RadDataPager>
</td>
</tr>
</tfoot>
<tbody>
<tr id="itemPlaceholder" runat="server">
</tr>
</tbody>
</table>
</div>
</LayoutTemplate>
<ItemTemplate>
<tr class="rlvI">
<td>
<telerik:RadPushButton ID="RadButton1" runat="server" RenderMode="Lightweight"
CausesValidation="False" CommandName="Edit" Text="" ToolTip="Edit">
<Icon CssClass="rbEdit"></Icon>
</telerik:RadPushButton>
</td>
<td>
<asp:Label ID="CustomerIDLabel" runat="server" Text='<%# Eval("CustomerID") %>'></asp:Label>
</td>
<td>
<asp:Label ID="CompanyNameLabel" runat="server" Text='<%# Eval("CompanyName") %>'></asp:Label>
</td>
<td>
<asp:Label ID="ContactNameLabel" runat="server" Text='<%# Eval("ContactName") %>'></asp:Label>
</td>
<td>
<asp:Label ID="ContactTitleLabel" runat="server" Text='<%# Eval("ContactTitle") %>'></asp:Label>
</td>
<td>
<asp:Label ID="AddressLabel" runat="server" Text='<%# Eval("Address") %>'></asp:Label>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr class="rlvA">
<td>
<telerik:RadPushButton ID="RadButton1" runat="server" RenderMode="Lightweight"
CausesValidation="False" CommandName="Edit"
Text="" ToolTip="Edit">
<Icon CssClass="rbEdit" />
</telerik:RadPushButton>
</td>
<td>
<asp:Label ID="CustomerIDLabel" runat="server" Text='<%# Eval("CustomerID") %>'></asp:Label>
</td>
<td>
<asp:Label ID="CompanyNameLabel" runat="server" Text='<%# Eval("CompanyName") %>'></asp:Label>
</td>
<td>
<asp:Label ID="ContactNameLabel" runat="server" Text='<%# Eval("ContactName") %>'></asp:Label>
</td>
<td>
<asp:Label ID="ContactTitleLabel" runat="server" Text='<%# Eval("ContactTitle") %>'></asp:Label>
</td>
<td>
<asp:Label ID="AddressLabel" runat="server" Text='<%# Eval("Address") %>'></asp:Label>
</td>
</tr>
</AlternatingItemTemplate>
<EditItemTemplate>
<tr class="rlvIEdit">
<td>
<telerik:RadPushButton ID="UpdateButton" runat="server" RenderMode="Lightweight"
CommandName="Update" Text="" ToolTip="Update">
<Icon CssClass="rbOk" />
</telerik:RadPushButton>
<telerik:RadPushButton ID="CancelButton" runat="server" RenderMode="Lightweight"
CausesValidation="False" CommandName="Cancel" Text="" ToolTip="Cancel">
<Icon CssClass="rbCancel" />
</telerik:RadPushButton>
</td>
<td>
<asp:Label ID="CustomerIDLabel1" runat="server" Text='<%# Eval("CustomerID") %>'></asp:Label>
</td>
<td>
<asp:TextBox ID="CompanyNameTextBox" runat="server" CssClass="rlvInput" Text='<%# Bind("CompanyName") %>'></asp:TextBox>
</td>
<td>
<asp:TextBox ID="ContactNameTextBox" runat="server" CssClass="rlvInput" Text='<%# Bind("ContactName") %>'></asp:TextBox>
</td>
<td>
<asp:TextBox ID="ContactTitleTextBox" runat="server" CssClass="rlvInput" Text='<%# Bind("ContactTitle") %>'></asp:TextBox>
</td>
<td>
<asp:TextBox ID="AddressTextBox" runat="server" CssClass="rlvInput" Text='<%# Bind("Address") %>'></asp:TextBox>
</td>
</tr>
</EditItemTemplate>
<EmptyDataTemplate>
<div class="RadListView RadListView_<%#Container.Skin %>">
<div class="rlvEmpty">
There are no items to be displayed.
</div>
</div>
</EmptyDataTemplate>
</telerik:RadListView>
</telerik:RadAjaxPanel>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
ProviderName="System.Data.SqlClient" SelectCommand="SELECT [CustomerID], [CompanyName], [ContactName], [ContactTitle], [Address] FROM [Customers]"></asp:SqlDataSource>
</div>
</form>
</body>
</html>