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.


No correct solution


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.

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top