ListBox - EntityDataSource

  • Alejandra Camino
  • Alexander Feuer
  • Ana Trujillo
  • Anabela Domingues
  • André Fonseca
  • Ann Devon
  • Annette Roulet
  • Antonio Moreno
  • Aria Cruz
  • Art Braunschweiger
  • Bernardo Batista
  • Carine Schmitt
  • Carlos González
  • Carlos Hernández
  • Catherine Dewey
  • Christina Berglund
  • Daniel Tonini
  • Diego Roel
  • Dominique Perrier
  • Eduardo Saavedra
  • Elizabeth Brown
  • Elizabeth Lincoln
  • Felipe Izquierdo
  • Fran Wilson
  • Francisco Chang
  • Frédérique Citeaux
  • Georg Pipps
  • Giovanni Rovelli
  • Guillermo Fernández
  • Hanna Moos
  • Hari Kumar
  • Helen Bennett
  • Helvetius Nagy
  • Henriette Pfalzheim
  • Horst Kloss
  • Howard Snyder
  • Isabel de Castro
  • Jaime Yorres
  • Janete Limeira
  • Janine Labrune
  • Jean Fresnière
  • John Steel
  • Jonas Bergulfsen
  • Jose Pavarotti
  • José Pedro Freyre
  • Jytte Petersen
  • Karin Josephs
  • Karl Jablonski
  • Laurence Lebihan
  • Lino Rodriguez
  • Liu Wong
  • Liz Nixon
  • Lúcia Carvalho
  • Manuel Pereira
  • Maria Anders
  • Maria Larsson
  • Marie Bertrand
  • Mario Pontes
  • Martín Sommer
  • Martine Rancé
  • Mary Saveley
  • Matti Karttunen
  • Maurizio Moroni
  • Michael Holz
  • Miguel Angel Paolino
  • Palle Ibsen
  • Paolo Accorti
  • Pascale Cartrain
  • Patricia McKenna
  • Patricio Simpson
  • Paul Henriot
  • Paula Parente
  • Paula Wilson
  • Pedro Afonso
  • Peter Franken
  • Philip Cramer
  • Pirkko Koskitalo
  • Renate Messner
  • Rene Phillips
  • Rita Müller
  • Roland Mendel
  • Sergio Gutiérrez
  • Simon Crowther
  • Sven Ottlieb
  • Thomas Hardy
  • Victoria Ashworth
  • Yang Wang
  • Yoshi Latimer
  • Yoshi Tannamuri
  • Yvonne Moncada
  • Zbyszek Piestrzeniewicz
Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

This example demonstrates how to bind RadListBox to Entity Framework data.

<telerik:RadListBox runat="server" ID="RadListBox1" Height="200px" Width="200px"
	DataSourceID="EntityDataSource1" DataTextField="ContactName">
</telerik:RadListBox>
<asp:EntityDataSource ID="EntityDataSource1" runat="server" 
	ConnectionString="name=NorthwindReadWriteEntities"
	DefaultContainerName="NorthwindReadWriteEntities" 
	EntitySetName="Customers" 
	Select="it.[ContactName], it.[City], it.[ContactTitle]"
	AutoPage="true" OrderBy="it.[ContactName]">
</asp:EntityDataSource>

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.

  • DefaultCS.aspx
<%@ Page Language="C#"  %>

<%@ 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 PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
</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 size-thin">
        <telerik:RadListBox RenderMode="Lightweight" runat="server" ID="RadListBox1" Height="200px" Width="300px"
            DataSourceID="EntityDataSource1" DataTextField="ContactName">
        </telerik:RadListBox>
        <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=NorthwindReadWriteEntities"
            DefaultContainerName="NorthwindReadWriteEntities" EntitySetName="Customers" Select="it.[ContactName], it.[City], it.[ContactTitle]"
            AutoPage="true" OrderBy="it.[ContactName]">
        </asp:EntityDataSource>
    </div>
    </form>
</body>
</html>

Find Assistance

Help Us Improve

Was this example helpful?