|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Retrieve data from nested repeater?Does anyone know how I would go about doing this? I've tried numerous
things... but none seem to work. Here's some code of what I've done: I'm trying to retrieve these label values: Dim FVProdPartNum As Label = CType(frmProduct.FindControl("lblProdPartNum"), Label) Dim FVProdDesc As Label = CType(frmProduct.FindControl("lblProdDesc"), Label) Dim FVProdPrice As Label = CType(frmProduct.FindControl("lblProdPrice"), Label) Those labels reside in a nested repeater. I've also tried it without the CType. Any help would be much appreciated. Thanks! Zamael wrote:
Show quote > Does anyone know how I would go about doing this? I've tried numerous Here's the code I use to get the data source of the nested repeater if> things... but none seem to work. Here's some code of what I've done: > > I'm trying to retrieve these label values: > Dim FVProdPartNum As Label = > CType(frmProduct.FindControl("lblProdPartNum"), Label) > Dim FVProdDesc As Label = CType(frmProduct.FindControl("lblProdDesc"), > Label) > Dim FVProdPrice As Label = > CType(frmProduct.FindControl("lblProdPrice"), Label) > > Those labels reside in a nested repeater. I've also tried it without > the CType. > > Any help would be much appreciated. Thanks! that helps: Private Sub rptCategory_GetData(ByVal Sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles rptCategory.ItemCommand Dim dv As DataRowView = CType(e.Item.DataItem, DataRowView) If (Not (dv) Is Nothing) Then Dim nestedRepeater As Repeater = CType(e.Item.FindControl("rptDetail"), Repeater) If (Not (nestedRepeater) Is Nothing) Then nestedRepeater.DataSource = dv.CreateChildView("myRelation") nestedRepeater.DataBind() End If End If End Sub |
|||||||||||||||||||||||