Click here to Skip to main content
15,908,768 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i have gridview on that on link button on button click another gridvie open in model popup In that I have Some Data has to fill now I want function to set focous on next row of last column in javascript or jquery
in child gridiew but it is not working



pleas help me

What I have tried:

<script type="text/javascript">
       $('.divAddFormula input[type=text]').keypress(function (e) {
           if (e.keyCode == 13) {
               //eerst de td vinden ipv $(this).next anders werkt het niet
               $(this).closest('td').next('td').find('input[type=text]').focus();
           } else {
               return;
           }
       });
   </script>


in this case divAddFormula name of my child Gridview


but It is not working when i Press tab it is going to parent grid
Posted
Updated 25-Oct-18 23:01pm
v2
Comments
Richard Deeming 26-Oct-18 8:16am    
if (e.keyCode == 13) {

"... when i Press tab ..."

Your code handles the Return / Enter key, not the Tab key.

It will also only move to the next cell in the current row; it won't move to the next row.

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