列中的Datagridview掩码值 [英] Datagridview mask values in column

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

问题描述

如何在Windows窗体应用程序中屏蔽 datagridview的值?例如,如何限制列datagridviewtextboxcolumn中的值,使其不大于给定的数字? (即该列中的单元格值≤9.6)
我在运行时以编程方式构建了datagridview。

How can I "mask" the values of a datagridview in a windows forms application? In example, how can I limit the value in a column datagridviewtextboxcolumn so that is not bigger than a given number? (i.e. cell value in that column < 9.6) I build my datagridview programmatically at runtime.

推荐答案

只需在CellEndEdit事件处理程序上使用if()

You can just use if() on CellEndEdit event handler

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

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