New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

EntityDataSource

Products
Category name: Beverages
Soft drinks, coffees, teas, beers, and ales
Category Photo
Category name: Condiments
Sweet and savory sauces, relishes, spreads, and seasonings
Category Photo
Category name: Confections
Desserts, candies, and sweet breads
Category Photo
Category name: Dairy Products
Cheeses
Category Photo
Category name: Grains/Cereals
Breads, crackers, pasta, and cereal
Category Photo
Category name: Meat/Poultry
Prepared meats
Category Photo
Category name: Produce
Dried fruit and bean curd
Category Photo
Category name: Seafood
Seaweed and fish
Category Photo

RadListView can be bound to all ASP 3.5 DataSource control types like EntityDataSource

All you need to do is set the DataSourceID property of the ListView to the ID of the Data Source control. Then you can use ASP.NET binding expressions (Eval or Bind) for the fields that will be visualized in the listview's body.

You may also see how to utilize Telerik OpenAccess ORM as a data access layer for our AJAX controls by visiting the OpenAccess ORM live demos here.

  • DefaultVB.aspx
  • DefaultVB.aspx.vb
  • styles.css
<%@ Page Language="vb" AutoEventWireup="false" Inherits="Telerik.ListViewExamplesVBNET.DataBinding.NET35DataSourceControls.DefaultVB"CodeFile="DefaultVB.aspx.vb"  %>

<%@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
    Namespace="System.Web.UI.WebControls" TagPrefix="asp" %>
<%@ 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">
        <telerik:RadListView ID="RadListView1" RenderMode="Lightweight" DataSourceID="EntityDataSource1" runat="server"
            ItemPlaceholderID="ProductItemContainer" DataKeyNames="CategoryID">
            <LayoutTemplate>
                <fieldset>
                    <legend>Products</legend>
                    <asp:PlaceHolder ID="ProductItemContainer" runat="server"></asp:PlaceHolder>
                </fieldset>
            </LayoutTemplate>
            <ItemTemplate>
                <fieldset class="categoryFieldset">
                    <legend>Category name:
                        <%# Eval("CategoryName") %></legend>
                    <table cellpadding="0" cellspacing="0">
                        <tr>
                            <td class="categoryDescription">
                                <table cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td>
                                            <%# Eval("Description")%>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td class="categoryImage">
                                <telerik:RadBinaryImage ID="RadBinaryImage1" runat="server" AlternateText="Category Photo" CssClass="binaryImage"
                                    ToolTip="Category Photo" Width="90px" Height="110px" ResizeMode="Fit" DataValue='<%# CType(Eval("Picture"),  Byte()) %>'></telerik:RadBinaryImage>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </ItemTemplate>
        </telerik:RadListView>
        <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=NorthwindReadOnlyEntities"
            DefaultContainerName="NorthwindReadOnlyEntities" EntitySetName="Categories">
        </asp:EntityDataSource>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance