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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:52:37+00:00 2026-06-04T11:52:37+00:00

Each of my columns will be a complex type. Using custom formatting I’d like

  • 0

Each of my columns will be a complex type.

Using custom formatting I’d like to be able to display the text of one property, then colour the cell (or do anything really) dependant on the other property.

So for example:

public class MyRowObject
{
    public MyCellObject Cell1 { get; set; }
    public MyCellObject Cell2 { get; set; }
    public SomeOtherCellObject Cell3 { get; set; }

}

public class MyCellObject
{
    public string MyDisplayText { get; set; }
    public int MyNumber { get; set; }
}

then use a custom formatter javascript function to do stuff, for example:

function formatCourseData(cellValue, options, rowObject) {

    var linkHTML = cellValue.MyDisplayText;
    if (cellValue.MyNumber > 10) {

        //format the html in some way

    }

    return linkHTML;
}

Now I know I cannot do cellValue.MyDisplayText but this or something like is what I would like to be able to do.

Is this possible?

Is it documented anywhere? (I’ve looked, but cannot find anything).

thanks in advance.

  • 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-04T11:52:38+00:00Added an answer on June 4, 2026 at 11:52 am

    What you can do is pass each field of the complex object as its own column, and then within your formatter you can use the formatter’s rowObject parameter to access the other value to do anything you need, such as coloring.

    Alternatively, you may not need to use a second column if each number indicates the same display text. You could just use a select formatter (or a custom version of one), or a lookup table or such.

    Anyway, here is an example of how you can use rowObject to access row data: access-row-data-in-jqgrid-custom-formatter

    Does that help?

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

Sidebar

Related Questions

We'd like to build a custom type - or simply add custom columns to
I have a table in a template, and one of the columns of each
I need a query that will return a table where each column is the
I have created script to find selectivity of each columns for every tables. In
Is there anyway to use LINQ to obtain the maximum of each columns for
I have three tables with 5 columns each. They can grow upto 15 rows
I have two data frames with two columns each. The first column is timestamps
I've a table with 2 columns and each column is 800px wide. I want
I have these div blocks called columns where each column div contains separate two
I've a report which has a has 5 columns on each page and I

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.