Monday, March 26, 2012

working with date types in a gridview

Hello,

In VWD 2005 here. Working with a gridview that has the edit button
enabled. One of the columns in the grid is of date type in the
database. When then user edits the date, clicks the update button, and
the gridview is databound again, "12:00:00 AM" appears next to the
recently edited date.

I only want to work with dates... not times. Is there a property or
some code I'm missing to keep only dates in the gridview and not the
time information?

Thanks!"Adam Sandler" <corn29@.excite.com> wrote in message
news:1151088090.454857.208120@.p79g2000cwp.googlegr oups.com...
Yes. There is a property you can change. For that column, set the
DateFormatString to {0:d} and the HtmlEncode property to False. That should
do it.

> Hello,
> In VWD 2005 here. Working with a gridview that has the edit button
> enabled. One of the columns in the grid is of date type in the
> database. When then user edits the date, clicks the update button, and
> the gridview is databound again, "12:00:00 AM" appears next to the
> recently edited date.
> I only want to work with dates... not times. Is there a property or
> some code I'm missing to keep only dates in the gridview and not the
> time information?
> Thanks!
TDAVISJR wrote:
> "Adam Sandler" <corn29@.excite.com> wrote in message
> news:1151088090.454857.208120@.p79g2000cwp.googlegr oups.com...
> Yes. There is a property you can change. For that column, set the
> DateFormatString to {0:d} and the HtmlEncode property to False. That should
> do it.

Thanks for the reply... I cannot find the DateFormatString and
HtmlEncode properties you are mentioning...

If I click the tasks menu for the Gridview, slect Edit Columns, In
Selected Fields -- select the column name, and look at the Template
Field Properties on the right... there are no properties avaliable with
the previously mentioned names.

Any suggestions?

0 comments:

Post a Comment