I have a grid being populated by SQL data. In my dataBound method I have a numerical condition that evaluates the text of particular cells, for example: if myCell.Text <90
It is possible for the cell to have NULL values, so I want to check before running these conditions to ensure that the cell is not null. However, the actual text in the cell is evaluated as "nbsp;" (removed the & so it will appear in this post). I don't want to hardcode something like NOT myCell.Text.Contains("nbsp") because that just feels sloppy and problematic.
If TypeOf e.Item Is GridDataItem Then
Dim dataItem As GridDataItem = e.Item
Dim myCell As TableCell = dataItem("Status")
If Not String.IsNullOrWhiteSpace(myCell.Text) Then
This is my current code and obviously the string " " passes this condition.
How do I properly check this value? Is there a different property I can evaluate?