0

i have a datatable which i am binding to a datagrid. On of the column in datatable has data of datetime format. i want to convert all the values under that column to "dd/mm/yyyy" format . I want to make the required changes from code behind.

If dt.Rows.Count > 0 Then
            gdvImport.DataSource = dt
            gdvImport.DataBind()
        End If
Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Rajan Goswami
  • 33
  • 1
  • 1
  • 7
  • http://stackoverflow.com/questions/29246840/how-do-i-display-mm-dd-yyyy-no-time-in-my-datagridview-column – Sam Axe Mar 25 '15 at 05:37
  • that didnt help .. i am using vb.net. i tried using dataGridView1.Columns["dateReceived"].DefaultCellStyle.Format = "MM/dd/yyyy"; but it showed error "DefaultCellStyle is not a member of System.Web.UI.WebControls.DataControlField" – Rajan Goswami Mar 25 '15 at 06:06

0 Answers0