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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:31:40+00:00 2026-05-12T08:31:40+00:00

I’ve been working with the excellent jqGrid plugin, and it works great. Recently though,

  • 0

I’ve been working with the excellent jqGrid plugin, and it works great. Recently though, I was asked to implement some custom tooltips for the grid. Now, the documentation is very thorough, but it doesn’t address how (if it is at all possible) to accomplish this.

Here’s an example of what I’m looking for:

|col A | col B |…
| data | data |…
| (mouse hover) – data x

I’ve searched through the documentation and source for how/where to define tooltips but the closest I have gotten is custom tooltips for buttons in edit mode. I do have an event handler for the afterInsertRow event – through that I could get the rowId and such, but I’m not sure how to define HTML attributes in that event.

EDIT: to clarify, I’d like to set the title attribute on an individual cell to a particular piece of data (that I already have in the jqgrid model)

EDIT 2: I’ve tried inserting the following into the afterInsertRow event, with no joy, where aData is the JSON model, and ExpirationDate is the model name:

afterInsertRow: function(rowid, aData) {
                grid.setCell(rowid, 'ExpirationDate', '', { title: aData.ExpiredBy });

the following code in the same event handler DOES work, however:

grid.setCell(rowid, 'ExpirationDate', '', { color: 'red' });

EDIT 3: working with redsquare’s excellent suggesstions, I’ve determined that the title attribute is being set sometime after the afterInsertRow event: I’ve stepped through and determined that it is being correctly set by either method outlined in comments, but unfortunately, I get a source code is not available for this location when trying to step further, meaning I can’t see exactly where the title is being changed.

EDIT 4: (thanks for your patience and helping me work through this!) again taking redsquare’s comment about trying the loadComplete event, I was able to successfully get and modify the cell’s attributes, but the title attribute stubbornly remains the same:

loadComplete: function() {
                var ids = grid.getDataIDs();
                for (var i = 0; i < ids.length; i++) {
                    grid.setCell(ids[i], 'ExpirationDate', '', { title: 'FOO!'});
                }

FINAL EDIT: please see my answer below – I was able to find the root cause of the issue, with help from redsquare.

Any help would be 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-05-12T08:31:40+00:00Added an answer on May 12, 2026 at 8:31 am

    Ok, I found the issue after doing some close inspection of the properties being set. It turns out that I, knuckle-head that I am, didn’t read the documentation for the grid.setCell(…) method closely enough:

    This method can change the content of
    particular cell and can set class or
    style properties. Where: •rowid: the
    id of the row,

    •colname: the name of the column (this
    parameter can be a number beginning
    from 0)

    •data: the content that can be put
    into the cell. If empty string the
    content will not be changed

    •class: if class is string then we add
    a class to the cell using addClass; if
    class is an array we set the new css
    properties via css

    •properties: sets the attribute
    properies of the cell

    Example :

    setCell(“10”, “tax”, ”,
    {color:’red’,’text-align’:’center’}’,{title:’Sales
    Tax’})

    will set the contents of the tax field
    in row 10 to red and centered and
    change the title to ‘Sales Tax’.

    In short, the arguments I was passing into the method were setting css properties (the 4th arg) instead of the attributes (the 5th arg). The result was that two title attributes were added, with one being improperly formatted. The below shows the correct invocation of the method to accomplish what I was trying to do:

    grid.setCell(rowid, 'ExpirationDate', '', '',{ title: aData.ExpiredBy});
    

    Thanks again to redsquare for his/her help in solving this!

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

Sidebar

Related Questions

No related questions found

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.