I'm building a collapsible grouping grid using Matt Berseth's example from mattberseth.com/blog/2008/01/building_a_grouping_grid_with.html
It has an inner listview "lvInner" nested in an outer listview "lvOuter". I'm trying to access a textbox in lv_Inner using
Protected Sub lvInner_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ListViewItemEventArgs) Handles lvInner.ItemDataBound
If e.Item.ItemType = ListViewItemType.DataItem Then
Dim tb As TextBox = TryCast(e.Item.FindControl("lvOuter").FindControl("lvInner").FindControl("TextBox1"), TextBox)
' Do something to TextBox1
End If
EndSub
I get an "Object reference not set to an instance of an object" error on line Dim tb.