I have a datagrid with two columns, the first column contains names, so normal text is entered there. The second column is "age" so only numbers go in that column.
When the user enters new data in the datagrid I can restrict that the field "age" is only composed by numbers, but when the user directly edits the datagrid with a double click in a filled cell, he can put letters in the age field. I want to restrict that so I found this in the forum
Code: Select all
on keyDown thePressedKey
if thePressedKey is in "0123456789" then
pass keyDown
else
beep
end if
end keyDown
How can I use that script selectively in the desired column?
Thank you very much and sorry for my english, it's not my mother language.
Best regards