checking listboxes in a datagrid

KyoZed

Newcomer
Joined
Mar 10, 2004
Messages
1
Hi, Im pretty new to ASP but ive done a bit of VB.
Ive got a datagrid that feeds off a dataset and populates it with a added extra listbox which is also fed off a dataset. I would like to be able to check all the list boxes that were created (could range from 1-20+) to make sure they are not a certain value.

Im having trouble finding out how to access each listbox to check them.
Help?

Ty
~KyoZed
 
This should work:

Code:
            Dim MyListBox As ListBox
            Dim dgItem as DataGridItem

            For Each dgItem In MyDataGrid.Items
                MyListBox = dgItem.FindControl("MyListBoxName")
                If Not IsNothing(MyListBox) Then
                    'Check your listbox here
                End If
            Next
 
Back
Top