我在读 DGV
public void ReadFromDB()
{
dataset = DB.ReadFromDB("SELECT * FROM orders");
dataGridView1.DataSource = dataset.Tables[0];
//another columns....
DataGridViewColumn sellDate = new DataGridViewTextBoxColumn();
sellDate.DataPropertyName = "sell_date";
sellDate.ReadOnly = true;
sellDate.Name = "Дата продажи";
dataGridView1.Columns.Add(sellDate);
dataGridView1.Columns[4].DefaultCellStyle.Format = "dd/MM/yyyy";
dataGridView1.Columns[4].Width = 80;
dataGridView1.Update();
}
为什么格式化不起作用?DefaultCellStyle.Format 设置为: