<%@ Page Language="c#" Inherits="Telerik.ListViewExamplesCSharp.DataBinding.VariousDataSources.DefaultCS"CodeFile="DefaultCS.aspx.cs" %>
<%@ Import Namespace="Telerik.Web.Examples.Grid" %>
<%@ 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" />
<telerik:RadFormDecorator RenderMode="Lightweight" ID="RadFormDecorator1" runat="server" DecoratedControls="All" ControlsToSkip="H4H5H6" />
<div class="demo-container">
<table id="Table2" class="mainTable">
<tr>
<td class="demoTitle">Binding RadListView to:
</td>
</tr>
<tr>
<td>
<telerik:RadListView ID="RadListView1" runat="server" RenderMode="Lightweight" ItemPlaceholderID="CityItemsHolder"
OnNeedDataSource="RadListView1_NeedDataSource">
<LayoutTemplate>
<fieldset class="fieldset">
<legend>Array list</legend>
<asp:Panel ID="CityItemsHolder" runat="server">
</asp:Panel>
</fieldset>
</LayoutTemplate>
<ItemTemplate>
<span>
<%# Container.DataItem %></span>
</ItemTemplate>
<ItemSeparatorTemplate>
<span class="itemSeparator">::</span>
</ItemSeparatorTemplate>
</telerik:RadListView>
</td>
</tr>
<tr>
<td>
<telerik:RadListView ID="RadListView2" runat="server" RenderMode="Lightweight" ItemPlaceholderID="ProductsHolder"
OnNeedDataSource="RadListView2_NeedDataSource">
<LayoutTemplate>
<fieldset class="productsFieldset">
<legend>Generic list</legend>
<asp:Panel ID="ProductsHolder" runat="server">
</asp:Panel>
</fieldset>
</LayoutTemplate>
<ItemTemplate>
<div class="productsWrapper">
<table class="productsTable">
<tr>
<td class="cellLabel">Name:
</td>
<td class="cellInfo">
<%# ((MyBusinessObject) Container.DataItem).Name %>
</td>
</tr>
<tr>
<td>Price:
</td>
<td class="cellInfo">
<%# String.Format("{0:C}",((MyBusinessObject) Container.DataItem).UnitPrice) %>
</td>
</tr>
<tr>
<td>Date:
</td>
<td class="cellInfo">
<%# String.Format("{0:d}", ((MyBusinessObject) Container.DataItem).Date) %>
</td>
</tr>
<tr>
<td>Available:
</td>
<td class="cellInfo">
<%# ((bool)DataBinder.Eval(Container.DataItem,"Discontinued") == false ? "Yes" : "No") %>
</td>
</tr>
<tr>
<td>
<hr />
</td>
<td>
<hr />
</td>
</tr>
</table>
</div>
</ItemTemplate>
</telerik:RadListView>
</td>
</tr>
<tr>
<td>
<telerik:RadListView ID="RadListView3" runat="server" RenderMode="Lightweight" ItemPlaceholderID="ShippersHolder"
OnNeedDataSource="RadListView3_NeedDataSource" OnDataBound="RadListView3_DataBound">
<LayoutTemplate>
<fieldset class="fieldset">
<legend>DataReader</legend>
<asp:Panel ID="ShippersHolder" runat="server">
</asp:Panel>
</fieldset>
</LayoutTemplate>
<ItemTemplate>
<table class="shipperTable">
<colgroup>
<col title="Shipper name" />
<col title="Phone" />
</colgroup>
<tr>
<td class="shipperCell">
<%# Eval("CompanyName") %>
</td>
<td class="shipperCell">
<%# Eval("Phone") %>
</td>
</tr>
</table>
</ItemTemplate>
</telerik:RadListView>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>