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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:33:31+00:00 2026-06-04T13:33:31+00:00

I am making a jqgrid using datatype local – a json array returned from

  • 0

I am making a jqgrid using datatype local – a json array returned from the server.

jQuery("#my_table").jqGrid(
                        { datatype: "local", 
                          colNames: ['ID', 'Name','Status', 'Date'],
                          colModel:[ {name:'id',index:'id', width:50, sorttype:"int"}, 
                                     {name:'name',index:'name', sorttype:"string"}, 
                                     {name:'status',index:'status', width:50, sorttype:"string"}, 
                                     {name:'date',index:'date', width:120, align:"left",sorttype:"date"} ], 
                          data: result,
                          ...});

However, one of the columns – status – is represented as numbers.

I would like to display this data as the respective strings. For example ‘Active’ for status = 1 and ‘Inactive’ for status = 0.

Is it possible to do this directly in jqgrid, for example as additional colModel parameter or jqgrid method?
I have read through the documentation of jqgrid and failed to notice way of addressing this problem.

I don’t want to change the data returned from the server, as I don’t see any point in passing redundant information.

I would also prefer if I don’t have to manipulate the result array in javascript directly as I don’t see point in traversing the array 2 times (once to change the status and the second for jqgrid loading).

  • 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-04T13:33:33+00:00Added an answer on June 4, 2026 at 1:33 pm

    You can use formatter: “select”:

    {name:'status',index:'status', width:50, 
        formatter:'select', editoptions: {value:'0:Inactive;1:Active'}}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I'm using jqGrid with my mvc.net / Ling2Sql prototype site that I'm making
I am making jQuery UI dialogs open with jqGrids (local data at the moment)
I am using CakePHP and jqGrid, but am having a difficult time making them
making a thumbnail from video using the picker is straight forward. However, when I
I am making fairly heavy use of jquery ui and jqgrid in the application
making a new jsp and got a mock-up from some analyst. Notice the sections
Im making slide show with jquery How i can set interval between two function
Im making a collision checking system with jQuery however it doesn't seem to work.
I am using jqgrid (standard) with EF 4 + MVC3 . I'd like to
making an infinite loop in javascript, and jQuery... this is my current code: $(#bg2).css({opacity:

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.