How to format cell in gridview from codebehind
Posted on 2011-03-23
I need an example or a link to an example that will format a cell in a gridview from date and time to just short date. I need to do it in the codebehind as the autogenerate is set to true. Also because I allow the user to choose their own columns from a dropdownlist to populate the report I need to check the columns selected (the selected values are the column names in the table)from the dropdown to determine first if it is one of the date fields in the table before I do the formatting from date time to just date. Can someone assist please. Thanks.