how to Edit Child datalist in a parent Datalist
Then, I put the child datalist in the ItemTemplate of the parent, and in the
Item_DataBound of the parent added the child Datalist
That works too - EXCEPT, when I click my child control's edit button, how do
I get:
1) the child datalist control so that I can set the EditItemIndex?
My parent Datalist onItemDatabound code below:-
Sub DataList_OnitemDB(ByVal sender As Object, ByVal e As DataListItemEventArgs)
If e.Item.ItemType = ListItemType.Item Or _
e.Item.ItemType = ListItemType.AlternatingItem Then
'Build the DataGrid
Dim dg As New DataList
Dim lb As New Label
'Find out the CategoryID
Dim Desc As Integer = e.Item.DataItem("DescID")
Dim Cat As Integer = e.Item.DataItem("CatID")
Dim rat As String = e.Item.DataItem("rating")
'newwly created Datalist in the parent Datalist
Dim g As DataList = CType(e.Item.FindControl("dg"), DataList)
'Create a DataView that has only the applicable FAQs
Dim myview As DataView = myDS.Tables("Season").DefaultView
myview.RowFilter = "DescID=" & Desc & "AND CatID = '" & Cat & "'" & "AND [rating] = '" & rat & "'"
g.DataSource =myview
g.DataBind()
'added the child datalist control
e.Item.Controls.Add(g)
End If
End Sub
How can i edit the child datalist?

