Hi,
I keep getting the error " Object reference not set to an instance of an object." in relation to the line : selA = CType(lstStuden ts.Items(r.Inde x), String)
Any advice/help?
'r' has been declared earlier as
I keep getting the error " Object reference not set to an instance of an object." in relation to the line : selA = CType(lstStuden ts.Items(r.Inde x), String)
Any advice/help?
Code:
Dim BRow As DataRow
Dim i As Integer
Dim selA As String
selA = CType(lstStudents.Items(r.Index), String)
BRow = objDataSet.Tables("tblStudent").Rows.Find(selA)
Do While selA <> ""
If BRow IsNot Nothing Then
Dim studentRows() As DataRow = BRow.Item("StudentID")
If studentRows.Length > 0 Then
For Each student As DataRow In studentRows
Dim strID As Integer = student("StudentID")
'add this item
objCurrentRow1.Item("StudentID") = strID
Next
End If
End If
i = i + 1
Loop
Code:
Dim r As MeasureItemEventArgs
Comment