DataGridView列格式 [英] DataGridView Column Formatting

查看:89
本文介绍了DataGridView列格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的datagrid表中输入两列的格式。我想让列只允许字母Y或N,如果没有输入则显示错误消息框。此外,当用户输入y或n时,它使其成为大写。

I want to enter formatting to two columns in my datagrid table. I want to have the column only allow the letters Y or N and if not entered shows an error message box. Also when the user puts in y or n it makes it upper case.

推荐答案

请参阅这些链接[在需要的地方转换为VB]



DataGridViewColumn Hosting MaskedTextBox [ ^ ]



Datagridview单元格特定的自定义掩码 [ ^ ]



如何:Windows窗体DataGridView单元中的主机控件 [<小时ef =http://msdn.microsoft.com/en-us/library/7tas5c80.aspxtarget =_ blanktitle =New Window> ^ ]



将MaskTextBox添加到DataGridView [< a href =http://www.vbforums.com/showthread.php?474976-Adding-MaskTextBox-to-a havenGridViewtarget =_ blanktitle =New Window> ^ ]



MaskedTextBox接受特定格式的文本输入...... [ ^ ]



问候..:)
Refer to these links [Convert to VB wherever needed]

DataGridViewColumn Hosting MaskedTextBox[^]

Datagridview cell specific custom mask[^]

How to: Host Controls in Windows Forms DataGridView Cells[^]

Adding MaskTextBox to a DataGridView[^]

MaskedTextBox accepts text input of a specific format......[^]

Regards..:)


这篇关于DataGridView列格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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