I would like to use a component that exposes the datasource property, but instead of supplying the datasource with whole list of objects, I would like to use only simple object. Is there any way to do this ?
The mentioned component is DevExpress.XtraDataLayout.DataLayoutControl – this is fairly irrelevant to the question though.
Databinding expects an IEnumerable object, because it enumorates over it just like a foreach loop does.
So to do this, just wrap your single object in an IEnumerable.
Even this would work: