List Info

Thread: Datagrid and details button does not display proper information




Datagrid and details button does not display proper information
user name
2006-12-05 00:25:44
Hi All
How do I access a CheckBoxList that is in a Repeater when
that repeater is
in a FormView? The code below gives an "object not
set..." error vecause I
am looking for the CheckBoxList in the FormView and not the
Repeater that is
in the FormView

Protected Sub FormView1_DataBound(ByVal sender As Object,
ByVal e As
System.EventArgs) Handles FormView1.DataBound
        If FormView1.CurrentMode = FormViewMode.ReadOnly
Then
            Dim row As FormViewRow = FormView1.Row
            Dim rowView As DataRowView =
CType(FormView1.DataItem,
DataRowView)
            Dim musicLabelCheckBoxList As CheckBoxList =
Nothing
            Select Case FormView1.CurrentMode
                Case FormViewMode.ReadOnly
                    mediaRepeater =
CType(FormView1.FindControl("mediaFormatRepeater1"
), Repeater)
                    musicLabelCheckBoxList =
CType(row.FindControl("mediaListCheckBoxList1"),
CheckBoxList)

            End Select
End Sub




Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )