ASP.NET Controls
visit Telerik website
MVC
Silverlight
WPF
ORM
Reporting
All Products
UI Components
ASP.NET AJAX
ASP.NET MVC
Silverlight
WinForms
WPF
Productivity
JustCode
Data
OpenAccess ORM
Reporting
Automated Testing
WebUI Test Studio
TFS Tools
Work Item Manager
Project Dashboard
Content Management
Sitefinity .NET CMS
Search Examples
select
Control
Example
select
Download
Videos
Help
Forums
ComboBox
Overview
First Look
Functionality
Autocomplete
Related ComboBoxes
Multi-column ComboBox
Templates
Animation
Filtering
Overlay
Validation Groups
Appearance and Internationalization
Keyboard Support
Right-to-left Support
Populating with data
XML String Binding
Declarative DataSources
EntityDataSource
LinqDataSource
Load On Demand
Load on Demand modes
Automatic Load On Demand
WCF Web Service
ADO.NET Service
Performance with Web Services
Client-Side API
Client-side Events
Add/Remove/Disable Items
Server-Side API
Server-side Events
Add/Remove/Disable Items
Appearance/Styling
Text with Icons
Application scenarios
Combo in Grid
Grid Filtered by Combo
Load on Demand Grid in Combobox
TreeView in ComboBox
Custom Attributes
Overview
Ajax
BinaryImage
Calendar
Captcha
Chart
ColorPicker
ComboBox
Dock
Editor
FileExplorer
Filter
FormDecorator
Grid
Input
ListBox
ListView
Menu
PanelBar
Rating
Rotator
Scheduler
Slider
Spell
SiteMap
Splitter
TabStrip
ToolBar
ToolTip
TreeView
Upload
Window
XmlHttpPanel
ComboBox
/ Load on Demand modes
Rate this demo:
1
2
3
4
5
Feedback
Run example in:
C#
VB.NET
Change Skin:
Vista
Black
Default
Forest
Hay
Office2007
Outlook
Simple
Sitefinity
Sunset
Telerik
Vista
Web20
WebBlue
Windows7
Server-Side (Automatic):
select
select
Server-Side:
select
select
Web Service:
select
select
Page Methods:
select
select
Example Source Code & Description
Instructions
Description
DefaultCS.aspx
DefaultCS.aspx
DefaultVB.aspx
DefaultCS.aspx.cs
DefaultCS.aspx.cs
Products.cs
DefaultVB.aspx.vb
Open in new window
RadComboBox provides its own Load On Demand mechanism - the RadComboBox loads its Items when you open the DropDown for the first time and when you type any text in the input. There are two types of Load On Demand mechanisms - Server-Side and Web Service.
You can you use either automatic or manual Server-Side Load On Demand.
In order to use the manual Server-Side approach set the
EnableLoadOnDemand
property to
true
and handle the
ItemsRequested
event, which fires each time Items are requested by the RadComboBox. The server-side event handler should return all relative matches for the currently typed text.
In order to load Items on portions (let say by 10 or 15, etc.) instead of loading all Items matching the given text you can set the
ShowMoreResultsBox
property to
true
. This will enable the footer which shows which Items are currently loaded and how many remain. Then you must implement the ItemsRequested event handler in a way it returns only the next number of Items. Using this approach you can achieve better performance in cases many Items are to be loaded in the RadComboBox.
Additionally you can set the
EnableVirtualScrolling
property to
true
and RadComboBox will load Items on portions even when you scroll the DropDown.
Setting up the automatic Load On Demand is straightforward:
Set a data source to the RadComboBox. Use either
DataSourceID
or the
DataSource
property to do this
and set the
DataTextField
and
DataValueField
properties to the respective fields in the data source.
(Note that when using DataSource you must set the property on each postback, most conveniently in Page_Init.)
Set
EnableAutomaticLoadOnDemand
to true.
(Optional) Set
ShowMoreResultsBox/EnableVirtualScrolling
to true to enable the respective features.
(Optional) Set
ItemsPerRequest
to the number of Items you would like to load per request. The default (-1) loads all Items at once.
In order to use a Web Service you must first mark it with the
ScriptService
attribute and expose a public method (marked with the
WebMethod
attribute) which would load Items similarly as in the Server-Side approach. The other difference in this approach is that data should be returned in objects of a custom serializable type.
Finally, you should keep into account that the
AllowCustomText
property is enabled (set to
true
) by default when the Load On Demand mechanism is enabled and the value set to the property is ignored.
Copyright 2002-2010 © Telerik. All right reserved |
Telerik Inc., 460 Totten Pond Rd, Suite 640, Waltham, MA 02451
www.telerik.com
|
Terms of Use
|
Contact Us