how to capture the key pressed

I ve to put a validation on key press … the requirement is sometihng like this
in a form there is a text box which accepts phone number… i want the user to preess only number if press any key other than number it should not be displayed in the box.

Save Tree Save Earth

hi, this is solved… i am posting the solution if any body else needs it.

override the testChange method like this

here is it public void textChange()
this.text(strkeep(this.text(), “0123456789”));

Hi Madhusudan,

If u hav a requirement that a particular field should hav only integers then,

u can put edt of integer type on that field.

Axapta itself handles the number formats.

But somtimes, you require that phone no includes characters like “-” etc. For example 91-9999999999.

So better to use the standard edt for Phone no.

Hope it helps…