Sub Item_RowContentFiller(RowID As Long, LayoutName As String, CellPanel As Panel, CellIndex As Byte, Position As Int)
If ULV.IsSelected(Position) Then
'The selected rows are green
CellPanel.Color = Colors.Green
Else
'Alternatively, the rows are coloured in white or in light gray
If Position Mod 2 = 0 Then
CellPanel.Color = Colors.White
Else
CellPanel.Color = Colors.LightGray
End If
End If
'Reads the data and sets the label text
Dim lbl As Label = CellPanel.GetView(0) 'The first (and only) view of the cell is a label
Select CellIndex
Case 0: dbCursor.Position = Position
lbl.Text = dbCursor.GetString("StudentSurname")
Case 1:
lbl.Text = dbCursor.GetString("StudentForename")
End Select
End Sub