mgonzales3 wrote:
I create a business layer object w/public properties. the db access
is also done from here. Its here I set the property values as well.
So when my UI request is made all values are saved to the viewstate
and loaded. Then I want to bind my object to a webcontrol:
myDatagrid.Datasource = myBusinessObj;
myDatagrid.Databind();
This is where my error occurs. Some error regarding IEnumerable and
IEnumerator.
The binding you want to perform is called 'complex' binding, which
means that an IListSource or IEnumerable object, containing other
objects, is bound to a grid/list like control. So binding a single
object to a grid isn't possible. Store your business object in an
arraylist and bind that to the grid.
FB
--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET:
http://www.llblgen.com
My .NET blog:
http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------