如何在datagrid中添加日期选择器?

时间:2014-07-23 06:48:48

标签: c# winforms

如何在数据网格中添加日期选择器,当我单击数据网格中的单元格时,我需要创建或显示日历或日期选择器。

this.cellDateTimePicker = new DateTimePicker();
this.cellDateTimePicker.ValueChanged += new EventHandler(cellDateTimePickerValueChanged);
this.cellDateTimePicker.Visible = false;
this.cellDateTimePicker.CustomFormat = "MM/dd/yyyy";
this.cellDateTimePicker.Format = DateTimePickerFormat.Custom;
this.dataGridView1.Controls.Add(cellDateTimePicker);

0 个答案:

没有答案