基础设施 Windows 网格

发布于 2024-07-08 01:15:40 字数 151 浏览 14 评论 0原文

我正在使用 Infragistics WinForms UltaGrid 控件,并且正在设置 RegexPattern 属性。 如何获取正在设置正则表达式的网格单元以实际使用该模式来限制条目? 或者我是否误解了 RegexPattern 属性的工作原理。

杰夫

I'm using the Infragistics WinForms UltaGrid control and I'm setting the RegexPattern property. How do I get the grid cell I'm setting the RegEx for to actually use that pattern to restrict entry? Or am I misunderstanding how the RegexPattern property works.

Jeff

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

欢烬 2024-07-15 01:15:40

列的 RegexPattern 属性用于单元格值验证。 因此,如果您设置此属性并且您的用户尝试编辑列中的值,则在完成后将根据此正则表达式对其进行验证。

RegexPattern property for the column is used for cell value validation. So if you set this property and your user tries to edit a value in the column, it will be validated against this Regex, after he is done.

执着的年纪 2024-07-15 01:15:40

您使用的是哪个版本的 NetAdvantage? NetAdvantage 2008 中没有 UltraGridCell 类的 RegexPattern 属性。

但是,如果您引用 UltraGridColumn 类的 RegexPattern 属性,它将执行您想要的操作。 单元格的值必须精确匹配,否则验证将失败。

Which version of NetAdvantage are you using? There is no RegexPattern property of the UltraGridCell class in NetAdvantage 2008.

However, if you are refering to the RegexPattern property of the UltraGridColumn class it will do what you want. The value of the cell must give exactly one match or else the validation will fail.

亚希 2024-07-15 01:15:40

Regex 属性仅在用户单击单元格外后才有效。 它不限制初始输入。 如果您想在输入键值时将 RegexPattern 应用到键值,我会尝试修改 UltraGrid.KeyDown 事件。

The Regex property only validates after a users clicks out of the cell. It does not restrict the initial entry. I would try modifying the UltraGrid.KeyDown event if you want to apply the RegexPattern to the key value as they are entered.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文