C#: custom celltemplate is not invalidating in datagridview?
问题 I am displaying some data in datagridview whose datasource is a datatable. For DateTime column, I want to use datetimepicker control to edit the value. So I tried the following code found in this link. https://msdn.microsoft.com/en-us/library/7tas5c80 After assigning the custom cell template to the DateTime column, datagridview is not invalidating immediately. Here is the code I tried dataGridView1.DataSource = dataTable; CalendarCell cell = new CalendarCell(); this.dataGridView1.Columns[