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

ListBox LoadOnDemand

3 Answers 44 Views
This is a migrated thread and some comments may be shown as answers.
Mammu
Top achievements
Rank 1
Mammu asked on 22 Mar 2011, 02:54 AM
Hi,

I was trying to RadListBox LoadOnDemand feature. I was creating the RadListBox and setting EnableLoadOnDemand property dynamically/programatically. I gave it a DataSource and called DataBind on it. But, It loads all the data in it instead of doing the LoadOnDemand. Am i missing something?

Thanks in advance!!!

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 22 Mar 2011, 06:36 AM
Hello Mammu,

When you are using Load On Demand, the DataSource property needs to be set each and every time the server is hit. This is necessary, because when Load On Demand is used, RadListBox doesn’t keep track of its items. They are not added to the Items collection and thus not allowing manipulating them on the server.

Take a look at the following help article and demo for more on this.
Load On Demand
ListBox / Load On Demand

Thanks,
Shinu.
0
Mammu
Top achievements
Rank 1
answered on 23 Mar 2011, 05:52 PM
Hi Shinu,

Thank you for your quick reply. Here is how the situation is. I have a User Control that has a RadListBox. when users click on a button on Page then the usercontrol loads on a popup and at the click event I want to give the listbox  datasource and call databind it. In that case how can I put it on Page_Load event. Any suggestions are appreciated.

Thank You!!!
0
Helen
Telerik team
answered on 25 Mar 2011, 10:42 AM
Hello Mammu,

Did you set the Height property of the RadListBox?
You may try to bind it on the Page_Load event of the user control.

Regards,
Helen
the Telerik team
Asked by
Mammu
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Mammu
Top achievements
Rank 1
Helen
Telerik team
Share this question
or