Home All Groups Group Topic Archive Search About

Retrieve data from nested repeater?

Author
13 Dec 2006 8:04 PM
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!

Author
13 Dec 2006 8:25 PM
Zamael
Zamael wrote:
Show quote
> 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

AddThis Social Bookmark Button