I want to extend the functionality of the UltraTextEditor to validate against certain input types use regular expressions.
If I add the UltraTextEditor to a grid column as the Editor property, I cannot seem to capture the key presses to enable me to suppress invalid characters from being entered into this field.
Is there another way to apply a regular expression to a grid cell in edit mode? Or perhaps a way to suppress certain characters from being entered into the Editor?
Thanks.
If you are using a grid, then you need to use the events of the grid, not of the editor control. The grid does not use the control, the control simply provides the grid with a copy of it's own editor.
Oh, that's a shame. Would be really good to have a control that works independantly :o( Maybe I'll suggest such an option should be available in future versions.....
And I read elsewhere that creating an Editor myself to do this would be a really challenge?
Hi Phil,
Well... if you wait for NetAdvantage 9.2, this will be a lot easier. We will be introducing the new UltraControlContainerEditor component which will allow you to embed a control inside a grid cell. So you will then be able to do your validation on a control level and use that control in a grid cell.
So how long do I have to wait for 9.2? Months, Years, Decades?
I have actually resolved the issue by exposing the section of code within the OnKeyPress method that was validating the key pressed, and then calling this from within the KeyPress event of the grid, but only if the grid is in Edit mode, and the active cell is using my version of UltraTextEditor as the Editor.
PhilAI said:So how long do I have to wait for 9.2? Months, Years, Decades?
I'm not sure exactly, but I think it's due for release next month. September or possibly October.