Loading RadDataSource in Code Behind

2 posts, 0 answers
  1. Eric
    Eric avatar
    3 posts
    Member since:
    Aug 2011

    Posted 29 Sep 2011 Link to this post

    I am sure I am doing something simple wrong but cannot seem to get the datasource to load from the codebehind page. Here is what I am trying to do:

    myDataSource = new RadDomainDataSource();
    myDataSource.DataContext = new BusinessApplication3.Web.DomainServices.myDomainContext();
    myDataSource.QueryName = "GetUser";
    myDataSource.LoadedData += new EventHandler<Telerik.Windows.Controls.DomainServices.LoadedDataEventArgs>(myDataSource_LoadedData);
    myDataSource.LoadingData += new EventHandler<Telerik.Windows.Controls.DomainServices.LoadingDataEventArgs>(myDataSource_LoadingData);
    myDataSource.AutoLoad = false;

    I have breakpoints at both of the LoadedData and the LoadingData calls to see when it hits. However even with the myDataSource.Load() call it never seems to hit the break points. To be sure it compiles and runs without any errors and the query is correct.

    I've done a test of putting all this onthe XAML side of things and it hits those calls as expected so I believe I am missing a bit of plumbing in the code behind but can't figure out what it is.

    Any help would be greatly appreciated.


  2. Vlad
    Vlad avatar
    11100 posts

    Posted 30 Sep 2011 Link to this post

    Hello Eric,

     Why not use QueryableDomainServiceCollectionView<> directly similar to this demo?

    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top