DataGridView comboBoxColumn dateTime format
问题 Winform, dataGridview with a comboBox column. The column datasource is pointing to an Sql table "dateTime" field format. Each row contains a data like 01/01/2014, 01/02/2014, etc.. I am trying to format the comboBox cell in dataGridView to show only month/Year. I tried directly in the designer with a custom format: and with the code: dataGridView1.Columns["Periodo"].DefaultCellStyle.Format = ("{0:M/yyyy}"); and like this dataGridView1.Columns["Periodo"].DefaultCellStyle.Format = "M/yyyy"; and