Binding fields on a gridview
I have a problem with binding class fields on a gridview using a databound column. I have a class called Product and another class called ProductType.
ProductType is an attribute of a Product entity. It contain fields like ProductTypeID and ProductTypeName.
I am using Product[] as a datasource of the gridview. What I want to do is to create BoundColumns for fields like Product.ProductType.ProductTypeID, but I dont know how to specify it in the datafield property of the boundcolumn. I can do it with Template column right now but if its possible I rather do it with the boundColumn.
Here is how I do it with template column. I set the Text property to be "((Product)Container.DataItem).ProductType.Product TypeID" and this is working.
Do have any solution for this or this is not possible at all?
Looking forward to your ideas guys!
Aldwin Enriquez
"Dont you ever give up!"
__________________
\"Dont you ever give up!\"
|