Retrieve data from nested repeater?

Z

zamael66

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!
 
Z

Zamael

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!

Here's the code I use to get the data source of the nested repeater if
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top