使用dateTimePicker在DataGridView中编辑日期 [英] Editable Date in DataGridView using dateTimePicker

查看:125
本文介绍了使用dateTimePicker在DataGridView中编辑日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的WinForms DataGridView中有一个DateTime列;目前该字段只能通过手动输入日期2010/09/02进行编辑,而需要使用DateTimePicker(或等价物)作为编辑器?

解决方案

看看这里:



如何:Windows窗体中的主机控件DataGridView单元格



有一个有趣的例子:)


I have a DateTime column in my winForms DataGridView; currently the field can only be edited by typing the date in manually "2010/09/02", what would be needed to have a DateTimePicker (or equivalent) used as the editor instead?

解决方案

Have a look here:

How to: Host Controls in Windows Forms DataGridView Cells

there's an interesting example :)

这篇关于使用dateTimePicker在DataGridView中编辑日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆