471,327 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,327 software developers and data experts.

databinding error - business layer props to my webcontrol

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.

any ideas? thanks.


Feb 13 '06 #1
1 1519
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#)
------------------------------------------------------------------------
Feb 14 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by oafyuf | last post: by
4 posts views Thread by Big Dave | last post: by
1 post views Thread by michaeltorus | last post: by
7 posts views Thread by djm | last post: by
7 posts views Thread by Vlado Jasovic | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.