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

  • Home
  • SEARCH
  • 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 548855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:07:25+00:00 2026-05-13T11:07:25+00:00

I have a jqGrid defined as such: $(#tableFeedbackReports).jqGrid({ url: ‘/FeedbackReports/GetFeedbackReport’, datatype: ‘json’, colNames: [‘ColA’,

  • 0

I have a jqGrid defined as such:

$("#tableFeedbackReports").jqGrid({
            url: '/FeedbackReports/GetFeedbackReport',
            datatype: 'json',
            colNames: ['ColA', 'ColB', 'ColC', 'ColD'],
            colModel: [{ name: 'ColA', index: 'ColA', width: 60 },
                        { name: 'ColB', index: 'ColB', width: 60 },
                        { name: 'ColC', index: 'ColC', width: 60 },
                        { name: 'ColD', index: 'ColD', width: 60 }, 
/* ... and so on */

Now, when the ajax call returns, it’s has to return an array of what will go into each row.

['value', 'value', 'value']

Is it possible to get jqGrid to accept key/value pairs for row data?

[{ 'ColA' : 'value', 'ColB' : 'value', 'ColC' : 'value', 'ColD' : 'value'}]

So when jqGrid loads the data, it’ll automatically binds the data to the column in the model?

  • 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-13T11:07:26+00:00Added an answer on May 13, 2026 at 11:07 am

    Have a look at the jsonReader option on the jqGrid Wiki, specifically its repeatitems property. From that page:

    The repeatitems element tells jqGrid that the information for the data in the
    row is repeatable – i.e. the elements have the same tag cell described in cell
    element. Setting this option to false instructs jqGrid to search elements in
    the json data by name. This is the name from colModel or the name described with
    the jsonmap option in colModel.

    Their example is:

    jQuery("#gridid").jqGrid({
    ...
       jsonReader : {
          root:"invdata",
          page: "currpage",
          total: "totalpages",
          records: "totalrecords",
          repeatitems: false,
          id: "0"
       },
    ...
    });
    

    Which will process data in the following format, with key/value pairs:

    { 
      totalpages: "xxx", 
      currpage: "yyy",
      totalrecords: "zzz",
      invdata : [
        {invid:"1",invdate:"cell11", amount:"cell12", tax:"cell13", total:"1234", note:"somenote"},
        {invid:"2",invdate:"cell21", amount:"cell22", tax:"cell23", total:"2345", note:"some note"},
      ...
    

    ]
    }

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

Sidebar

Related Questions

I have a jqGrid in an ASP.Net MVC. The grid is defined as: $(#list).jqGrid({
everything is working fine with my jqgrid except a small issue. i have defined
I have an ActionResult in my HomeController defined to return JSON. The JSON is
I have a container background defined in CSS like this; .container { background:#fff; margin-left:auto;
Basics Hi all, I have see the tableToGrid method (by Peter Romianowski) defined as
I have jqgrid that has 23 headers. It has edit dialog with a form
I hope you have a good morning. I'd like to use jqGrid in my
I have a JQGrid with loadonce:true(so it's all client side) and paging enabled(with, say
I have a jqGrid where the View icon is enabled (view:true), so that a
I have a jqGrid where I want all the rows to be in edit

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.