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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:31:45+00:00 2026-06-05T18:31:45+00:00

So I have a jqgrid, and I use custom formatters to format the collumns,

  • 0

So I have a jqgrid, and I use custom formatters to format the collumns, anyway when I click on a collumn head to sort, it sorts the collumns as expected but it removes the formatting I did, and instead puts “[object Object]” into the collumns where the formatter should have done its work.

The particular formatter is:

function(cellVal, options, rowObject){
    var optsURI = '../webrelease/common/images/page_v2_u'+(rowObject.opt2Up==2?1:0)+'_s'+(rowObject.optDuplex?1:0)+'_c'+(rowObject.optColor?1:0)+'_52.png';
    return $('<img class="finishing_icon" height="40" src="'+optsURI+'" />').attr('jobid', rowObject.jobid).click(finishingOptsCycle);
}

This seems to work well for removing and adding rows, but as soon as I hit resort the collumn changes from an image to a string [object Object]

Any ideas on how I can resolve this?

for completeness here is my entire jqgrid (excl rows & formatter):

grid.jqGrid({
    datatype: "local",
    editurl: "clientArray",
    width: 680,
    height: 290,
    colNames: [...],
    colModel: [...],
    hidegrid: false,
    shrinkToFit:false,
    multiselect: true,
    scroll:1,
    loadui: "block",
    loadtext: "Loading job list...",
    caption: 'Job List <img class="refreshbutton" width="20" height="20" src="../webrelease/desktop/images/icon_circle_arrow_right.png" />',
    pager: '#jqgrid_pager',
    onSelectRow: rowSelect,
    onSelectAll: allRowsSelect
});
  • 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-05T18:31:47+00:00Added an answer on June 5, 2026 at 6:31 pm

    The reason of the problem is the wrong usage of custom formatter. The function which implements custom formatter must return string.

    I don’t recommend you to assign id attribute to elements of grid if it is not really required. I don’t understand why you could need to have <img> with ids.

    If you need implement some custom action on click on the cell with <img> you can better use onCellSelect callback.

    If you net yet implemented unformat for the same column where you use custom formatter I recommend you to do this.

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

Sidebar

Related Questions

I have a jqgrid, where it has a custom formatter to column1. I need
I have a jqGrid on a page and users can click a button to
how to use custom control in Jqgrid for Field. example in add/edit popup I
I have a jqGrid in my project and I would like to add custom
I have a jqgrid and use form editing on this grid. The issue I
I have a jqGrid on an ASP.Net MVC view. I want to use to
I have a JqGrid with the form editing option. When I click on add
I am trying to use the JQGrid plugin and have run into an issue
I have some grid which use form edit. But after edit success then page
The first page of results with a jqgrid rowObject returns expected data but then

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.