Databinding and XtraReport

I had a problem recently using object data sources in my XtraReports. I was assigning an object hierarchy to the DataSource property and was getting weird exceptions.
The problem is XtraReport does not handle well one object as a data source, it prefers to have a collection of objects.
The simple fix was to use a BindingSource as the data source and assign my object to the BindingSource's DataSource property. And yes, I should have been using a BindingSource from the start, I know :)

Comments

  1. This is wonderful. Took me closer to locating and solving my issue than the whole XtraReport documentation and knowledge base! Mille fois merci.

    ReplyDelete

Post a Comment

Popular posts from this blog

Create a draft release and start it using the TFS REST API

Adding a delay before processing Textbox events

Change the deployment URL of a ClickOnce application