Hello,
Can anybody tell me how to validate ultragrid cell value which
must be a unique single alphanumeric string and may not contain special characters e.g. ?, !, $ etc.
But The thing is that user should not allow to enter(type) other than alphanumeric char means if user can press @ it'll not show in gridcell .plz repl.its urzent.
thanks in advance.
If you need to prevent the user from typing certain characters, then you have a couple of options.
1) You could set an InputMask on the column.
2) You could trap the KeyDown event and cancel certain keystrokes.
Approach 1 is easier, but it also means that you have to enforce a length limit on the string. You have to specify, as part of the mask, the maximum number of characters that the user can enter.
Option 2 is more flexible and gives you more control.
Hi Mike,
thanks for your response.
I hav done that validation in keypress event.but the problem is when user rightclick in the cell and paste some special character is working.how to prevent this one.like if user paste there some special char then remove that char(or all char) from that cell.
plz reply me .its urzent.