Dhanu

Dhanu

  • NA
  • 6
  • 0

How to do validation for perticuler column to allow only numbers in UltraWebgrid control using asp.net c# .

Oct 7 2008 8:26 AM

Hi ..frnds

How to do validation for perticuler column to allow only numbers in UltraWebgrid control using asp.net c# .

i have one webform and i done bind atable to ultrawebgrid and after that ,

i need to editable only one column(example :salary ) allow to edit the only numbers .not allow to special char or chars .

here is my javascript code :

function isNumberKey(evt)

{

var charCode = (evt.which) ? evt.which : event.keyCode

if (charCode > 31 && (charCode < 48 || charCode > 57))

return false;

return true;

}

and i call this method on UltraWebGrid property -> display layout -> clientside events -> before allowupdate event .

it is not allowing special char or char . fine  but its not allowing even Numbers (0-9) ..?

so , plz help me ..

Thanks

Dhanunjaya G