I have a List(Of Customer) and part of the Customer object is a List(Of Order). I programmatically bind the Customers, using RadGrid1.Datasource = CustomerList. I want a DetailTable under each Customer row with all Orders. The examples I've seen use table data sources. I would expect something like...
| Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As |
| Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound |
| If e.Item.ItemType = GridItemType.Item Or e.Item.ItemType = |
| GridItemType.AlternatingItem Or e.Item.ItemType = GridItemType.SelectedItem Then |
| Dim myCustomer As Customer = e.Item.DataItem |
| If myCustomer.hasOrders Then |
| 'The following is pseudo-code |
| e.Item.DetailTable.DataSource = myCustomer.Orders |
| e.Item.DataBind() |
| End If |
| End If |
| End Sub |
But that doesn't seem to be how to crack this nut. Any help is appreciated.