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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:42:04+00:00 2026-05-21T03:42:04+00:00

I have started to use jqGrid in our project a few days ago and

  • 0

I have started to use jqGrid in our project a few days ago and now I have a problem I can’t solve.
Below is my code:

var colModel = JSON.parse(gridResult.ColModel);

var grid = $("#tblGrid").jqGrid({
    url: './WebServices/Demand.asmx/GetDemandOpenHoursTwo',
    ajaxGridOptions: { contentType: 'application/json; charset=utf-8' },
    serializeGridData: function (data) {
        return JSON.stringify(data);
    },
    datatype: 'json',
    mtype: 'POST',
    jsonReader: {
        root: function (obj) { return obj.d.rows; },
        page: function (obj) { return obj.d.page; },
        total: function (obj) { return obj.d.total; },
        records: function (obj) { return obj.d.records; }
    },
    height: 148,
    rowNum: 10,
    rowList: [10, 20, 30],
    colNames: gridResult.Columns,
    colModel: colModel,
    pager: "#gridPager",
    viewrecords: true,
    caption: "Öppetider",
    hidegrid: false,
    toolbar: [true, "top"],
    editurl: './WebServices/Demand.ascx/SaveDemandOpenHours',
    ajaxRowOptions: { contentType: 'application/json; charset=utf-8' },
    serializeRowData: function (data) {
        return JSON.stringify(data);
    }
});

And I have a button which calls the method saveRow:

toolbar.find('.te-save').click(function () {
    gr = grid.getGridParam('selrow');
    if (gr !== null) {
        grid.saveRow(gr, false);
    }
});

Everything works well with retrieving the data to the grid. But when I call saveRow I get a response with status 404 and message NOT FOUND.
I tried to debug this and since the retrieving is working I changed the editurl to the exact same as the url. And then in the function serializeRowData I manipulate the data which will be posted and I replace it with the exact same data as the data posted to the web service method which retrieves data.
With other words I am doing the exact same request when retrieving data as when I post an edited row. Hence the retrieving is working and the editing is not.

I inspected the requests in firebug and I can see that the requests are actually not the exact same. They differ in one parameter.

The request which is working has:

Accept: application/json, text/javascript, */*; q=0.01

And the request not working has:

Accept: */*

In every other way they are the same.
Can this be the error? (It has to be this because one of them is working..).

Can anyone help me with the solution to my problem?

  • 1 1 Answer
  • 1 View
  • 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-21T03:42:04+00:00Added an answer on May 21, 2026 at 3:42 am

    It seems to me that you have an typing error. You should use

    editurl: './WebServices/Demand.asmx/SaveDemandOpenHours'
    

    instead of

    editurl: './WebServices/Demand.ascx/SaveDemandOpenHours'
    

    The SaveDemandOpenHours return no data in case of successful saving, so the value of Accept header is not really important. If it is needed you can add dataType: 'json' in the ajaxRowOptions which you use.

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

Sidebar

Related Questions

I have started programming few years ago. and generally i use for programming C
In our Java project we have started to use jooq for query building instead
I have started to use Mustache JS some hours ago. I wonder if there
Question simple and quick: I have started to use Netbeans to write some code
I have started a new mvc project and clicked on project\properties\web - use local
I have started to use MSpec for BDD, and since long ago I use
I have started to use NHibernate 3.0 and PostgreSQL for a small project, so
I have started to use Alfresco CMS. In my project, there is a new
I have just started to use Code Sniffer to clean up my code. I
Right now I have just started to use pyparsing to parse simple postfix expressions.

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.