DataGridViewRow中某一列为日期要怎么设置列的属性
可以使用DataGridView中的Columns集合的Item属性,获取到指定列的属性,然后设置其ValueType为DateTime类型,例如:
dataGridView1.Columns[0].ValueType = typeof(DateTime);
其中,0表示要设置的列的索引,可以根据实际情况修改。
原文地址: https://www.cveoy.top/t/topic/bbV7 著作权归作者所有。请勿转载和采集!