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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:29:45+00:00 2026-06-13T07:29:45+00:00

I have got an asp.net form, with a jqgrid on it. The user can

  • 0

I have got an asp.net form, with a jqgrid on it. The user can enter an account number on a main form, and then enter some data onto a jqgrid.

At the point the user saves the row in the grid, i would also like to pass the account number across from the form to the save proc, as we use this to work out some discount info for the lines in the grid.

I’m not sure how at the point of saving to pass this information accross?

UPDATE

I’m using json as my datatype, using inline editing and using editurl to post the grid to a web service that deals with saving it to a back end database.

UPDATE 2 – Solution

This is the code i have used to pass the value of a text box to along with the normal post data

jQuery(grid).jqGrid('inlineNav', "#pager", { edit: false, add: true, del: false, search: false,

                //add the extra params to the post call
                addParams: {
                    useDefValues: true,
                    addRowParams: {
                        keys: true,
                        aftersavefunc: reloadGrid,
                        extraparam: { accNo: getAccNumber, colourName: getColName }
                    }
                },
                editParams: {
                    keys: true,
                    aftersavefunc: reloadGrid,
                    extraparam: { accNo: getAccNumber, colourName: getColName }
                }
            });

This function gets the value of the asp.net text box

//get the value of the account number field
            getAccNumber = function () {
                return $("#<%= txtAccNo.ClientID %>").val();
            };
  • 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-13T07:29:46+00:00Added an answer on June 13, 2026 at 7:29 am

    You can use extraparam option of editRow:

    onSelectRow: function (id) {
        ...
        $(this).jqGrid('editRow', id, {
            keys: true,
            url: "yourServerUrl",
            extraparam: {
                accountNumber: function () {
                    return $("#accountNr").val();
                }
            }
        });
        ....
    }
    

    Additional parameter accountNumber with the current value from the input field with id=”accountNr” will be sent additionally to the standard data.

    You can see here the corresponding demo. Because no URL are exist under http://www.ok-soft-gmbh.com/jqGrid/myServerUrl one will get an error, but one can easy verify in the Fiddler, Firebug or in Developer Tools of IE or Chrome that additional parameter accountNumber will be really send to the server.

    In case of ASP.NET code you could be needed to use the syntax like "<%=accountNumber.ClientID%>" to get id of the corresponding input field of the form.

    One can use alternatively inlineData option of jqGrid with properties defined as methods. The idea here is the same as described here for postData. In the answer you will find an example where inlineData are used.

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

Sidebar

Related Questions

I've got an asp.net application where each client will have their own data entry
I have a basic form that asks the user to enter some text in
I've got a web form using asp.net. In this form I have a lot
I have got two buttons, which both submit a form in asp.net. I need
I have got a question with regards to upgrading asp.net mvc applications from v1
I have got one weird issue. I am working on an asp .net mvc
I am a fresher and I have got a project in asp.net and c#.
I've got an asp.net gridview inside an updatepanel. One of the fields I have
I have just recently got involved in a classic ASP.NET project which contains lots
I have a FormView control in an ASP.NET 2.0 app. I've got the database

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.