RhythmAddict112
Programmer
Hi All,
I've got a object that has a property that is a collection. I have binded a collection of this object to a gridview, and I need to know how to only display the zero-th index of my collection as a column...
pseudo-code
I've got a object that has a property that is a collection. I have binded a collection of this object to a gridview, and I need to know how to only display the zero-th index of my collection as a column...
pseudo-code
Code:
Dim oUserList as List(Of oUser) = GetUsersList()
Dim gv as GridView
gv.DataSource = oUserList
gv.DataBind()
'Let's say that the .Orders property of the user object is a generic collection
In my GridView, I only want to display the first item in oUser.OrderList. How can I do this?