DataGridView输入格式 [英] DataGridView input format
本文介绍了DataGridView输入格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个DataGridView,仅需要验证用户输入的两位数字.不允许输入文字,最多只能输入两位数字.
请帮助
I have a DataGridView and need to validate input from a user to two digit numbers only. No text allowed, and no more then two digit entries.
Help please
推荐答案
两位数"和不允许输入文字"是矛盾的.任何数字是文本.
您将在这里找到一个食谱: http://stackoverflow.com /questions/3051996/how-to-prevent-bad-formatted-data-input-in-datagridviewcell [
"Two digit numbers" in combination with "no text allowed" is oxymoron. Any digit is text.
You will find one recipe here: http://stackoverflow.com/questions/3051996/how-to-prevent-bad-formatted-data-input-in-datagridviewcell[^].
—SA
这篇关于DataGridView输入格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文