This is a migrated thread and some comments may be shown as answers.

[Solved] Load on Demand without writing custom code?

1 Answer 77 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Ken Fine
Top achievements
Rank 1
Ken Fine asked on 17 Jun 2008, 06:51 PM

I have a very simple AJAX scenario I want to enable as easily as possible using the Telerik AJAX RadControl Q1 release (most recent).

I have dropdowns with 2000 items on them. These dropdowns aren't always used. I would like them to be populated with data if the user wants it. Otherwise, I don't want them populated.

I see lots of examples that involve writing some easy custom code, wiring it into the ItemsRequested handler, loading into a dataset, etc.

I would prefer to be as lazy as possible and use the VS.NET IDE as much as possible.

Questions:
1) Is there a way to make this work with a SqlDataSource rather than putting data access code in my code? I would rather call to the database in SqlDataSource than in inline code as you do in this example.

2) If the answer is "no" is there another simple way to delay the load of that data until the user clicks the down arrow?

If there is no way to do this outside of code I will probably query against my ORM framework (EntitySpaces), but I'm just curious if SqlDataSource can do this.

-KF

1 Answer, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 18 Jun 2008, 02:27 PM
Hi Ken Fine,

Setting only the EnableLoadOnDemand property to true is not enough for the Load-On-Demand functionality to work fully - the code in the ItemsRequested event handler is required.

This is the minimum configuration of the control, so that it works in Load-On-Demand mode.

Greetings,
Simon
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ComboBox
Asked by
Ken Fine
Top achievements
Rank 1
Answers by
Simon
Telerik team
Share this question
or