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 8122667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:54:16+00:00 2026-06-06T05:54:16+00:00

Here is my code that adds a line to the grid by pressing the

  • 0

Here is my code that adds a line to the grid by pressing the enter key.
All lines are in the add mode editrow=true.

    jQuery("#energy").jqGrid('addRow', { position: "first" });
            jQuery("#energy").jqGrid('bindKeys', {
            "onEnter": function (rowid) {
                jQuery("#energy").jqGrid('addRow');
                    }
           });

What you need to specify that prametr editrow=false, when adding rows?

  • 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-06-06T05:54:18+00:00Added an answer on June 6, 2026 at 5:54 am

    Unfortunately it seems that the code for addRow always sets the new row to edit mode:

    addRow : function ( p ) {
            ...
            if(p.useFormatter) {
                $("#"+$.jgrid.jqID(p.rowID)+
                                  " .ui-inline-edit", 
                                  "#"+$.jgrid.jqID($t.p.id)).click();
            } else {
                var opers = $t.p.prmNames,
                oper = opers.oper;
                p.addRowParams.extraparam[oper] = opers.addoper;
                $($t).jqGrid('editRow', p.rowID, p.addRowParams);
                $($t).jqGrid('setSelection', p.rowID);
            }
    

    But the good news is that, you should be able to use saveRow to get the row out of edit mode. Just make sure you pass a unique row ID for the new row so that you are able to reference it in the next call:

     jQuery("#energy").jqGrid('addRow', {rowID: myNewRowID});
     jQuery("#energy").jqGrid('saveRow', myNewRowID);
    

    If you have problems with saveRow, you can also try restoreRow.

    Does that help?

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

Sidebar

Related Questions

here is code that I have: agent = Mechanize.new page = agent.get 'http://google.com' page.save
I have here a code that saves the data of the main.php contents When
I cannot get this to work, here is code that I found in another
Here is the code that I am using: if (!($fp = fsockopen('ssl://imap.gmail.com', '993', $errno,
Here's the code that is generated by default <div id=ui-datepicker-div class=ui-datepicker ui-widget ui-widget-content ui-helper-
Here is the code that i have class A { public: void Func1() const;
Here is the code that I am referring to: <?php if ( is_archive() )
Here is the code that cause me problem since few hours: TabItem newTab =
Here's my code that is not working: print To: ; my $to=<>; chomp $to;
Here is my code that fails: bool Table::win(const Card &card) { for (int i

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.