I want to restrict my ultratexteditor to accept alphanumeric characters only in c#. Please provide me help for the same.
Hi,
I'm not sure what kinds of limitations you are referring to. DataBinding works the same for all controls, whether you are using the Inbox controls or the Infragistics controls.
In general, the Infragistics controls always have more functionality than the inbox controls - otherwise what would be the point of them? :)
Thanks Mike,
Using UltraMasked Text Editor control resolved the issue for me.
I am new to Infragistics controls and I am still getting a hang of things. I am comfortable with inbox controls but prefer ultra controls if they provide ease of operations and flexibility. But in some cases I have found ultra controls to be very limited and rigid in terms of data binding and run time editing like the ultrawingrid.
If you want to limit entry then you are probably better off using the UltraNumericEditor or the UltraMaskedEdit control. These controls let you set a MinValue and a MaxValue and also an input mask.
Humming Bird said:Is there any better way to achieve this other than the key down/press events??
Not with UltraTextEditor, no.
Humming Bird said:If not then what benefit I have from using ultra controls??
UltraTextEditor has a number of advantages over the inbox TextBox control. For one thing, it's based on the Infragistics WinForms PLF. So it has more robust appearance capabilities and has support for AppStyling.
Also, there is the ButtonsRight and ButtonsLeft collections which allow you to add buttons to the control.
There are a number of other features, as well. None of them have much to do with limiting text input, though.
I have a text box which should accept only numeric values between 1 - 200.
Is there any better way to achieve this other than the key down/press events??
If not then what benefit I have from using ultra controls??
Handle the KeyDown event and set e.Handled to true if the key is not alphanumeric. You will probably want to allow navigation keys, as well.