Quantcast
Channel: Our ComponentOne » All Posts
Viewing all articles
Browse latest Browse all 14170

Reply To: Speacial Charecter

$
0
0

Hello Sreejesh,

I would suggest you to catch the Spread’s onKeyDown event client side and check the KeyCode. If it found to be of a special character then you may cancel the event. Something like:

 <script type ="text/javascript">
       function window.onload() {
           var spread = document.getElementById('<%=FpSpread1.ClientID %>');
           spread.onkeypress = OnKeyPress;
       }
       function OnKeyPress() {
           var spread = document.getElementById('<%=FpSpread1.ClientID %>');
       var k = event.keyCode;
       alert(k);
    
           if((k > 20 && k < 70))
           {              
               event.cancelBubble = true;
               spread.EndEdit();
           }
       }
</script>

The above is a suggested approach , you would need to find out the KeyCode for all special characters and then check in if condition.

Thanks,
Deepak Sharma


Viewing all articles
Browse latest Browse all 14170

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>