ListBox LoadOnDemand

4 posts, 0 answers
  1. Mammu
    Mammu avatar
    9 posts
    Member since:
    Jan 2010

    Posted 21 Mar 2011 Link to this post

    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!!!
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 22 Mar 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mammu
    Mammu avatar
    9 posts
    Member since:
    Jan 2010

    Posted 23 Mar 2011 Link to this post

    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!!!
  5. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 25 Mar 2011 Link to this post

    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
Back to Top