Blank Text values - just wondering about this

A

Alex Shirley

Hi

I'm just wondering why the following behavour is happens:

If I try to get a text value from a datagrid (i.e.
e.Item.Cells(x).Text), and that value is blank, I will get " "
instead of a blank value.

I assume this is behaviour by design? But I wonder why this is the
case? I'm just trying to get some understanding here. I've written a
tiny function (below) to get round it, but I'm curious about why this
value is being returned.

Cheers

Alex

Public Function checkdatagridblank(ByVal thestring As String)
If thestring <> "&nbsp;" Then
Return thestring
Else
Return ""
End If
End Function
 
E

Eliyahu Goldin

Alex,

My understanding is that some browsers don't handle empty cells well.

Eliyahu
 
A

Alvin Bruney [MVP]

some browsers like IE denote a space by indicating
Non Breaking Space
n b sp

as opposed to an empty cell
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top