Click here to Skip to main content
15,886,518 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.
Posted
Comments
Fadi Halboni 22-Jun-14 2:30am    
Dear,

you use GridView or RadGridView?????

1 solution

Hi,

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();");

XML
<script type="text/javascript">

    function test() {
        alert("called");
        return false;
    }

</script>


This is the test code, change the code as per your requirement
 
Share this answer
 

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