Reputation: 569
I am struggling to set the FolderID integer to the FolderID property on the FolderList collection. FolderList is bound to the outer repeater. Most examples I have seen use DataTables and not custom collections. I have looked around and really can't find anything to help me.
'--------------------------------------------------------
'Protected Sub Page_Load()
'--------------------------------------------------------
'.
'.
'.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'----------------------------------------------------
'Output
'----------------------------------------------------
'.
'.
'.
With Folders
'------------------------------------------------
'Data
'------------------------------------------------
'.
'.
'.
.DataSource = New FolderList(1)
'------------------------------------------------
'Bind
'------------------------------------------------
'.
'.
'.
.DataBind()
End With
End Sub
'--------------------------------------------------------
'Protected Sub Folders_ItemDataBound()
'--------------------------------------------------------
'.
'.
'.
Private Sub Folders_ItemDataBound(sender As Object, e As RepeaterItemEventArgs) Handles Folders.ItemDataBound
'----------------------------------------------------
'Declarations
'----------------------------------------------------
'.
'.
'.
Dim Item As Repeater = e.Item.FindControl("Files")
'----------------------------------------------------
'Output
'----------------------------------------------------
'.
'.
'.
With Item
Dim FolderID As Int32 = 1
'------------------------------------------------
'Data
'------------------------------------------------
'.
'.
'.
.DataSource = New PageList(FolderID)
'------------------------------------------------
'Bind
'------------------------------------------------
'.
'.
'.
.DataBind()
End With
End Sub
Upvotes: 0
Views: 27
Reputation: 569
Dim FolderID As Int32 = DataBinder.GetPropertyValue(e.Item.DataItem, "FolderID")
Upvotes: 1