ObjectDataSource Report Binding

2 posts, 0 answers
  1. Kurt
    Kurt avatar
    17 posts
    Member since:
    Aug 2006

    Posted 26 Feb 2011 Link to this post

    I am having some difficulty figuring out how to get a Report to bind to my business objects.

    I am using Interfaces in the following way:

    public interface ITopInterface
            string A { get; }
    public interface IBottomInterface: ITopInterface
            string B { get; }
           bool C { get; }

    In my implementation I end up with something like to following:
    public class BaseClass : ITopInterface
        public string A { get { return "test"; } }
    public class newobject : BaseClass, IBottomInterface
       public string B { get { return "test"; } }
      public bool C { get { return true; } }

    So, when I am create the object data source, I am binding to a collection of "IBottomInterface", however, only the properties of that
    IBottomInterface) seem to be  visible and usable to the report? Anyway, I
    was thinking that all of the properties of both interfaces 

    would be there, as IBottomInterface is a ITopInterface..? Is there
    a way to force the object data source to see the entire object?
  2. Peter
    Peter avatar
    1631 posts

    Posted 02 Mar 2011 Link to this post

    Hi Kurt,

    We have performed a test locally with the provided code snippets and we have successfully bound to the newobject that exposes the ITopInterface and IBottomInterface interface properties. Check out the attached class library.

    All the best,
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top