For Each oCell As DataGridViewCell In oRow.Cells
If oColumnTypes(i) Is GetType(DataGridViewTextBoxColumn) OrElse oColumnTypes(i) Is GetType(DataGridViewLinkColumn) Then
Try
e.Graphics.DrawString(oCell.Value.ToString, oCell.InheritedStyle.Font, New SolidBrush(oCell.InheritedStyle.ForeColor), _
New RectangleF(oColumnLefts(i), nTop, oColumnWidths(i), nHeight), oStringFormat)
Catch ex As NullReferenceException
MessageBox.Show("we had a null reference exception")
End Try
ElseIf oColumnTypes(i) Is GetType(DataGridViewButtonColumn) Then