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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:04:33+00:00 2026-06-12T19:04:33+00:00

I have a grid using jqgrid . I need to store the some data

  • 0

I have a grid using jqgrid. I need to store the some data returned by the url:, in a local variable so that I can display it in the subgrid. For this I add that column as a hidden column in the main grid, which is of the format in json:

"Details":[{"Name":"ttt", "Quantity":"12"}] . 

Then in the loadcomplete: function I save the value to a variable using

var griddata = $("#grid').getCol('Details', false);

Now when I access griddata[0], I get a object Object. I tried to parse it to get the values correctly, but to no avail. I tried:

griddata[0].Details.Name 

or

griddata[0].Details.0.Name 

or

griddata[0].Name, 

but all failed. I guess I am missing the format if the data returned by the getcol() function.I looked up the documentation on the method and it says that it returns just the values when we specify false, but could not get any examples.
If there are any examples or if there are any pointer to the solution, it will be greatly appreciated.

  • 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-12T19:04:34+00:00Added an answer on June 12, 2026 at 7:04 pm

    If you check the type of griddata[0] (for example with typeof operator) you will see that it has type of string – this is because the value you are getting is the result of toString() on the object you have passed. The reason for that is the way in which jqGrid is treating values.

    If you want to store JSON as the value, you need to stringify it entirely:

    "Details": "[{\"Name\":\"ttt\", \"Quantity\":\"12\"}]"
    

    Now you can deserialize those string values into objects like this:

    var griddata = $.map($("#grid").jqGrid('getCol', 'Details', false), function(value) { 
        return JSON.parse(value); 
    });
    

    After that you can access the objects in the way you want:

    var name = griddata[0].Name;
    var quantity = griddata[0].Quantity;
    

    As an alternative you can split your object into two columns, so the values can be accessed directly with getCol.

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

Sidebar

Related Questions

I'm using .NET webforms. I have a grid view that can use Eval(Name) in
Hi I'm using jqgrid to show some information in a grid. But I have
I am using jqgrid 3.8. I have a grid which is having some editable
Using jqGrid (4.4) with Grails (2.0.3). I have a grid with checkbox columns. Data
I have just started using jqGrid , and I have some tables that I
I have some drag and drop functionality I am using in an xceed grid.
<%= Html.Trirand().JQGrid(Model.OrderGrid,Grid1)%> I need to call this using javascript? Can anybody tell me? <%=
i have a asp.net project and its using jqgrid as the javascript grid. How
I have a Jqgrid which has datatype as local. I am loading data at
I am having an issue with the using jqGrid with JSON data returned from

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.