Re: Why can't I read a date out a cell in a gridview
- From: COHENMARVIN@xxxxxxxxx
- Date: Fri, 20 Jun 2008 03:37:30 -0700 (PDT)
On Jun 19, 4:28 pm, "Mark Rae [MVP]" <m...@xxxxxxxxxxxxxxxxx> wrote:
<COHENMAR...@xxxxxxxxx> wrote in message
news:ff087d9e-93c0-4a58-a4d6-98b663b1dbcf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have code like this:
FromRow = GridViewPlacementsForDups.SelectedRow
strCellContents = FromRow.Cells(4).Text
It works fine for most of the cells in the row. But cell #4 (above)
has a date in it, and when I run the debugger, strCellContents is
blank.
Am I doing something wrong?
Is the date inside another control e.g. a label...?
What is the value of FromRow.Cells(4).Controls.Count?
--
Mark Rae
ASP.NET MVPhttp://www.markrae.net
I found out the problem - which is that the date is in a template
control, while the other fields of the grid are not.
(The reason I had put in a template control was to format it).
However, I also find that MSDN.microsoft.com gives wrong advice on
getting the value out of this template control. So I've given up on
that approach, and I've made the sql query return a string form of a
date that doesn't have to be put in a template control.
Thanks,
Marv
.
- References:
- Why can't I read a date out a cell in a gridview
- From: COHENMARVIN
- Re: Why can't I read a date out a cell in a gridview
- From: Mark Rae [MVP]
- Why can't I read a date out a cell in a gridview
- Prev by Date: Re: Need help with regex expression
- Next by Date: Re: Problem using a UNC Path within a COM component in asp.net
- Previous by thread: Re: Why can't I read a date out a cell in a gridview
- Next by thread: Dropdown cell in table
- Index(es):
Relevant Pages
|