开发者

GridView and ObjectDataSource issue

Here's the problem I'm having in my asp project.

My shopping cart consists of 3 classes like the picture below.

The class Carrinho has a List of Arranjo wich by itself has a List of Product.

Now I want to display the Carrinho's list and I have a GridView whose data source is an ObjectDataSource that's associated to the Carrinho object. It should display, for now, just the Total property from Arranjo but I keep getting an empty page alwa开发者_Python百科ys. I have debugged the project and the list is definitely not empty.

What am I doing wrong?

GridView and ObjectDataSource issue


It's not regular to do that (biding a list of list<object> ) . Any way if you insist to do that you should know you need to bind a list of object to each item in GridView Row , So that item should be like List controls . otherwise you should convert your field to "ItemTemplate" and you bind by your own . Here is a good example


Hope that helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜