Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
830
No Child Bands Displayed When Binding To A Custom Object
posted

I have a custom object called BLPerson which contains a property called Orders which returns a collection of BLOrder i.e in relationship terms a person can have many orders.

I use an ObjectDataSource to bind a collection of BLPerson to an UltraWebGrid and when displayed successfully shows rows of people but with no child band for the orders. I have checked the BLPerson collection before it is bound to the grid and some people do have 1 or more orders.

Also at design time if I edit the grid i only see one band for the BLPerson object, I would have expected to see a child band for the orders

So my problem is that binding a grid to a custom object does not display any child bands at either design or run time.

Any help appreciated. 

Thanks John

  • 8680
    posted

    I don't know much about ObjectDataSources, but when I want to bind related data, I create a DataSet object containing my tables and their relationships.  I've posted an example at:

    http://news.infragistics.com/forums/p/5384/24367.aspx#24367

    Does your ObjectDataSource return both tables and their relationship?

    You can define bands at design time using the WebGrid designer.  (Right-Click on the grid; select "Quick Design")  But if you do this, make sure you have AutoGenerateColumns turned off.

    HTH