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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:43:46+00:00 2026-05-31T21:43:46+00:00

I have a a gridpanel that has the following fields: Name ID Address Home_Phone

  • 0

I have a a gridpanel that has the following fields:

Name ID Address Home_Phone Cell

Some records that return to the store may not have any data for some of these fields, rather then display an empty column for that record in the grid I would like to show a default value of N/A.

So I would have

Name     ID   Address      Home_Phone    Cell
Shaun    2    My Address     N/A          N/A

Rather then:

Name     ID   Address      Home_Phone    Cell
Shaun    2    My Address   

I know of two ways to do this:

  1. In the back end if the field doesn’t exists return a “N/A” for that column in the JSON.
  2. Create a template with a method that check if the record doesn’t contain the value return “N/A”.

My question is, is there an easier way to tell the grid column if no value is found in the record display the default N/A?

  • 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-31T21:43:47+00:00Added an answer on May 31, 2026 at 9:43 pm

    You can add a renderer for your columns. You either add a renderer for each column or you can define your own column if you have more columns with this behaviour.

    //add this for each column config (works for null values and empty strings)

    {
        renderer: function(value){
            if (Ext.isEmpty(value)) {
                return 'N\\A';
            }
            return value;
        }
    }
    

    or add the renderer to a component that extends the column and use that throughout the application.
    It’s easier to do this on the front end rather then modifying the backend and sent extra unnecessary data like ‘N\A’.

    Hope It helps.

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

Sidebar

Related Questions

Using 4.0.6 I have a gridpanel with an actioncolumn that has two items, a
I have some buttons in a bottom toolbar of a gridpanel that control adding,
i have a paging grid and some function that load a new store to
I have a store that loads a grid that displays state name, capital, and
I currently have a GridPanel with the Ext.ux.RowEditor plugin. Four fields exist in the
I have a gridpanel that allows inline editing of a column. This column uses
I have the following extjs code that createa 2 tabs and a grid. How
I have a JSON store that I would like to auto load into a
i'm new with extjs4, i have a problem with gridpanel that should be show
I have this gridPanel: Ext.define('BM.view.test.MacroList', { extend: 'BM.view.GridPanel', alias:'widget.macro-test-list', store: 'Tests', initComponent: function() {

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.