为Datagrid视图列设置掩码 [英] Set Mask for Datagrid view Column
问题描述
嗨
伙计我有一个数据网格视图而不是可编辑的(它有空表格列)
i想要为某些列设置掩码datagrid视图所以当用户输入一些数据时,它会被转换为给定的格式
就像一个蒙面文本框及其代码
例如:
$ b当用户在StarTime列中输入数据时$ b:1023
然后点击输入数据变为:10:23
和所以...
有人可以帮助我吗?
甚至可能吗?
Hi
Guys i have a datagrid view than is editable (it has empty table columns)
i want to set mask for some of the columns in datagrid view so when the user enters some data it gets converted to the given format
just like a masked textbox and what it does
for eg :
when users enters a data in StarTime column like this : 1023
then hits enter the data becomes like : 10:23
and so on ...
can someone help me ?
is it even possible ?
推荐答案
Hi
请按照链接获取问题这么简单;)
Hi
Please follow of links for getting your question it is so simple ;)
DefaultCellStyle. Format = "(###) ###-####"
http://www.vbdotnetforums.com/winforms-grids/31486-how-mask-cell-datagridview.html 一> [ ^ ]
http://social.msdn.microsoft.com/Forums/windows/en-US/a92df8b2-56ce-4658-a9ae-600ef82e4852/datagridview-cell-specific-custom -mask [ ^ ]
最好的问候。
http://www.vbdotnetforums.com/winforms-grids/31486-how-mask-cell-datagridview.html[^]
http://social.msdn.microsoft.com/Forums/windows/en-US/a92df8b2-56ce-4658-a9ae-600ef82e4852/datagridview-cell-specific-custom-mask[^]
Best Regards.
这篇关于为Datagrid视图列设置掩码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!