Fantastic you got it !!!
If I test the content of the Cell with ... If vDgi_GridItem.Cells(10).Text =
" " it returns true. I was trying to show the content of the text but
of course it was rendering as HTML and so not showing.
I did read somewhere about the NULLTEXT property of datacloumn, that I may
be able to control what it does with Null values when showinng in data
grids.
Regards
Simon
"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
6 characters is the length of string " " (non-breaking space}. That it
what datagrids have in empty cells.Check cell text on this value to see if
it is empty.
Eliyahu
"Simon Prince" <si**********@joseph.NOSPAM.co.uk> wrote in message
news:cs*******************@news.demon.co.uk... Hi,
I'm trying detect an empty cell in a datagrid when the content is posted
back to the server.
My code is...
Dim vDgi_GridItem As DataGridItem
For Each vDgi_GridItem In oASP_Dgd_Receptions.Items
Response.Write( CType( vDgi_GridItem.Cells(10).Text.trim.length ,
string) )
If vDgi_GridItem.Cells(10).Text.trim.length > 0 then
...OK...
Else
...Not OK...
End If
Next
When the cell contains text, the length works fine, but if the cell is
empty (bound to a field with an empty string) it always returns a length of 6
characters.
Any ideas why ?? Why is the "trim" not emptying these space or whatever
is in there.
Regards
Simon