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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:26:59+00:00 2026-06-11T06:26:59+00:00

I am writing some code based around jqGrid and I’ve come across a problem

  • 0

I am writing some code based around jqGrid and I’ve come across a problem relating to the rendering of empty cells.

I use JSON to return the data to render and when there is no value, instead of just outputting nothing, jqGrid outputs a space instead. This is causing problems because I need to trigger a function if the cell is empty.

I have looked at the returned JSON using Firebug and it is definitely correct, there is no space being returned.

Looking at the latest jqGrid demo this problem can be replicated:

  1. Visit http://trirand.com/blog/jqgrid/jqgrid.html
  2. Look at any demo grid which contains an empty cell and “Inspect this element” in Firebug.
  3. You will note that this demo grid does the same thing

I appreciate this is likely for validity reasons but is there a workaround for this? At the moment my working selector reads:

$(".jqgrow td:not(:first-child)")

I have tried to use :contains as below to combine them but not had any luck so far:

$(".jqgrow td:not(:contains(' '))")
$(".jqgrow td:not(:contains(' '))")
$(".jqgrow td:not(:contains(' '))")

I would appreciate any assistance!

UPDATE 1:

I have produced this jsFiddle which expands on the problem: http://jsfiddle.net/fJZst/

I’ve copied one line from my table to keep it as simple as possible. On the demo, if you mouse over a cell which doesn’t contain a space you’ll get an alert. If it does contain a space, you won’t. If you substitute the alert for a tooltip in your head, the selector looks good. If I try this in jqGrid the alert always fires so I’m a little more confused..

  • 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-11T06:27:00+00:00Added an answer on June 11, 2026 at 6:27 am
    $('.jqgrow tr td').filter(function() {
            return $.trim($(this).text()) != ''
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am in the process of writing some validation code based on these assumptions:
I am writing a calendar-based web application and am working on some code that
I am re-writing some code for a new re-design and I am wondering if
I'm writing some code that will take a screenshot of another application, given its'
I'm writing some code for a very limited system where the mod operator is
I am writing some code in C: int main(){ char guess[15]; guess = helloValidation(*guess);
I am writing some code that will go through a file, edit it as
I am writing some code where I count the number of Div children and
I'm writing some code (just for fun so far) in Python that will store
I'm writing some code that has a lot of substitution. There's a list<char> productions

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.