EnableAutomaticLoadOnDemand with parametes in your datasource

3 posts, 0 answers
    16 posts
    Member since:
    Nov 2008

    Posted 15 Jun 2010 Link to this post

    When i place parameters in my datasource that i am using with my RadCombo, these parameters do not reflect the changes i make on the client.

    For Example if i type in a textbox that is a paramter of the datasource linked to my combo, the server-side never gets this value ?

    Is there any way to remedy this, has anyone use parameters with EnableAutomaticLoadOnDemand  ?

    16 posts
    Member since:
    Nov 2008

    Posted 18 Jun 2010 Link to this post

    When using ControlParameters in the data source it has to access the value of these controls, however this value is not posted back so it does not work.

    Any ideas how to get this to work with a datasource that uses CotnrolParameters ...?
  3. Simon
    Simon avatar
    2281 posts

    Posted 18 Jun 2010 Link to this post


    Indeed, during a Load On Demand request each control on the page is in its initial state. Additionally the ItemsRequested server-side event fires after the DataSource has been asked for data, so you cannot use this event to set control parameters even if you have their new values.

    In your case, the proper solution would be the following:
    1. Set EnableLoadOnDemand to true and EnableAutomaticLoadOnDemand to false.
    2. Handle the client-side ItemsRequesting event and use the Context object to supply all of the ControlParameter's values.
    3. Handle the server-side ItemsRequested event and use the values in the Context object, and either supply them to the Controls, which properties are used in the ControlParameters of the data source and call its Select method or simply construct your custom query to the underlying data source by using the parameter values from the client.
    I hope this helps.

    Kind regards,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top