Click here to Skip to main content
14,698,883 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using ajaxTab Panel, and in each panel i have gridview inside which there are few textboxes in which user has to input Sr. No which should be Numeric, I tried the Nemeric Validation uisng Javascript function called upon onKeyPress event./

But the Event itself is not getting fired. If any one has tried the same and found some solution please answer this question.
Fadi Halboni 22-Jun-14 2:30am

you use GridView or RadGridView?????

1 solution


If you use GridView, try this

1. Find TextBox object inside RowDataBound
2. Add attributes with the TextBox object like below code

txtName.Attributes.Add("onclick","javascript:return test();");

<script type="text/javascript">

    function test() {
        return false;


This is the test code, change the code as per your requirement

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900