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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:53:07+00:00 2026-05-14T08:53:07+00:00

I am new to JqGrid, so please bear with me. I am having some

  • 0

I am new to JqGrid, so please bear with me. I am having some problems with styling the cells when I use a showlink formatter.
In my configuration I set up the AfterInsertRow and it works fine if I just display simple text:

 afterInsertRow: function(rowid, aData) {
   if (aData.Security == `C`) {
     jQuery('#list').setCell(rowid, 'Doc_Number', '', { color: `red` });
 } else
 {
   jQuery('#list').setCell(rowid, 'Doc_Number', '', { color: `green` });
 }
}, ...

This code works just fine, but as soon as I add a formatter

{'Doc_Number, ..., 'formatter: ’showlink’, formatoptions: {baseLinkUrl: ’url.aspx’}

the above code doesn’t work because a new element is added to the cell

<a href='url.aspx'>cellValue</a>

Is it possible to access programmatically the new child element using something like the code above and change the style?

`<a href='url.aspx' style='color: red;'>cellValue</a>` etc.

UPDATE: In order to work you have to do as follow:

jQuery('#list').setCell(rowid, 'Doc_Number', '', 'redLink');

CSS Class

.redLink a {
    color: red;
}
  • 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-14T08:53:08+00:00Added an answer on May 14, 2026 at 8:53 am

    You could add a class to the cell:

    jQuery('#list').setCell(rowid, 'Doc_Number', '', 'redLink');
    

    Then define a CSS class along these lines:

    .redLink a {
        color: red;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to jqGrid, and having trouble with achieving a couple of tasks.
I am new to jqGrid, and having trouble with achieving a couple of tasks.
I am new to jqGrid, and having trouble with achieving a couple of tasks.
I'm using the new API to set the width of my jqGrid like this:
Folks, I am completely new to jQuery and JqGrid both. Usually I take some
I am new to JQgrid and am unsure how to handle this use case.
I am new to jqgrid and am trying to use json to load the
i see there is a new version of jqgrid and it now supports having
Some quick searching only turns up adding a new row to a jQGrid via
I am new to jqGrid. I am trying to use dataUrl in editoptions to

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.