基础设施 Windows 网格
我正在使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
列的 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.
您使用的是哪个版本的 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.
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.