Hello,
when i assign a valuelist to a grid column, it is possible to select the value from the dropdown.
But it is also possible to enter text in th edit portion of the cell.
So far so good.
If the valuelist only has displaytext that represents numbers, how can it be done that the user cant enter any non number characters into the edit field?
It sounds like you want the user to only select from the list and not type. In that case, you just need to set the Style of the grid column to DropDownList.
Hello Mike,
no the user should also be able to type in the numbers. Our list of possible values consist of numbers from 1 to 32 with spaces and those numbers represent indices in a database table. So only valid numbers contained in the valuelist items can be entered.
I tried to set the style to integer, but then i dont have a dropdown....
:-)
greetings
Wolfgang
Hi Wolfgang,
You could trap the KeyDown event and cancel any key that is not a numeric.
Or you could use the BeforeExitEditMode or BeforeCellUpdate events to validating what the user entered.
Or you could use the UltraWinValidator component.