Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7575575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:42:59+00:00 2026-05-30T16:42:59+00:00

I have a jqGrid with only certain columns that are editable and I would

  • 0

I have a jqGrid with only certain columns that are editable and I would like to be able to implement functionality similar to excel when you press tab and enter. These columns are editable from the start, because I call editRow on every row in loadComplete, so that the user may click in any one of the cells in these columns and change the information. I would like it to be such that when you press tab the cursor goes to the next editable cell in the current row until it gets to the end and upon pressing tab again, goes to the first editable cell of the next row; and upon pressing enter goes to the first editable cell of the next row no matter what cell you happen to be in of the previous row. Every time cell focus is changed, data is saved to the server.

I’ve been doing quite a bit of research, but none of it has worked. I have the functionality for each keypress in the colModel under editoptions and dataEvents as a keydown event that checks to see which button has been pressed and then executes the appropriate code. The first thing I tried used the editCell method of jqGrid where I passed it the row and column of the next cell I would like to move the cursor to, but that didn’t work and I think it is because I’ve already called editRow on every row. I’ve also tried changing the focus to the cell I’m trying to go to by using $.click() or $.focus() but that has not worked either.

Something extra to note is that when these columns are blurred, I recompute the column totals on the client side. I have tried putting the different things I’ve tried to change focus inside setTimeout but that hasn’t worked either.

I basically would like to keep it where all of the cells in the columns that I want to be editable are editable at any time and the user may either click on that specific cell or tab/enter over to it to edit it. This is how it looks for clarification:

http://cl.ly/2W3E1U3i1k3K0W2Y0r0n

Thanks for the help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:43:00+00:00Added an answer on May 30, 2026 at 4:43 pm

    I was able to figure it out and I’m not sure why it took me so long to figure out. Nothing that jqgrid provided worked and I had tried many different things from jQuery and I finally found something that works:

    {
        type: 'keydown',
        fn: function(e) {
            var key = e.charCode || e.keyCode;
            //TAB
            if(key == jq.ui.keyCode.TAB) {
                 setTimeout(function() { 
                   jq('#' + currentRowId + '_nextColName').focus();
                   jq('#' + currentRowId + '_nextColName').select(); 
                 }, 500);
            }
            //ENTER
            else if (key == jq.ui.keyCode.ENTER) {
                 var nextRow = parseInt(currentRowId) + 1;
                 jq('#' + currentRowId + '_thisColName').blur();
                 jq('#' + nextRow + '_firstColName').select();
            }
        }
    }
    

    This makes it so that tab takes you to the next column and enter always takes you to the first column of the next row while maintaining that all of the cells are always editable and you can click on any editable cell at any time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to use jqGrid for a great many grids that have only
In jqGrid for update/edit to work I have to make primary key columns editable.
I have a couple of columns in jqGrid with edittype=select. How can I read
I am using a jqGrid that has allot of columns to it. I added
I have a jqGrid that's working 100% except that it keeps displaying undefined in
Is it possible to make it so that a jqGrid will have a width
I have to add filtering to a jqGrid that is completely managed on the
I have been going through the jqGrid wiki and havent been able to find
I am using jqgrid 3.8. I have a grid which is having some editable
I am loading a full treegrid but i would like to have it collapse

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.