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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:13:59+00:00 2026-05-25T13:13:59+00:00

I have a pretty standard Grid -> Store -> Model architecture in Extjs4. The

  • 0

I have a pretty standard Grid -> Store -> Model architecture in Extjs4. The requirement is that five of my eight fields in each record are mandatory, so I thought to use the Model valdiations config:

    Ext.define('TransferRecord', { extend: 'Ext.data.Model',
    fields: transferRecordFields,
    idProperty: 'RID',
    validations: [
    { type: 'presence', field: 'FNAME' },
    { type: 'presence', field: 'LNAME' },
    { type: 'presence', field: 'GENDER' },
    { type: 'presence', field: 'DOB' },
    { type: 'presence', field: 'TRANSFER_TYPE'}]
});

This sort of works – when the store syncs, it will not sync new records to the database unless all those fields are defined. However, there is no feedback to the user, other than the sync does not complete successfully.

Ideally, I would like to highlight the offending fields so the user knows which ones still need values (and conversely – clear the highlighting when they are ok). I know that if I call record.validate for each record, I can get an list of error objects, but I am not sure of how to translate that information to the cell at row X, Field ‘FNAME’ needs to change color (or the best way to find that cell so I can apply the change).

I feel like I’m missing something simple – that there is probably an API that already helps me here, but I can’t find it.

  • 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-25T13:13:59+00:00Added an answer on May 25, 2026 at 1:13 pm

    I have discovered that the example custom renderer in the EXTjs examples is not complete – that the renderer does take a lot of extra parameters that the example did not show.

    I was able to get it working by defining the following renderer function and assigning it to each column:

        function mandatoryColumnRenderer(value, metaData, record, rowIndex, colIndex, store) {
            var errors = record.validate();
            if (errors.getByField(this.columns[colIndex].dataIndex).length > 0) {
                metaData.style = 'background-color: Gold;'
            }
            return value;
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a pretty standard css layout where I use a container div that
I currently have a a pretty standard jqgrid that I would like to change
I have a Rails application that right now is pretty standard: Heroku/PostgreSQL backend, users
I have a ListView with a pretty standard view for each row - an
I have a Rails 3 application with a pretty standard multipart form that includes
I have a pretty standard scenario where I have a model which in this
I have an App that does the pretty standard operation: It plays audio (streamed
I have a pretty standard contact form that uses a cfc for processing now.
I have pretty large file names that follow a standard naming practice and I
I have a pretty standard table set-up in a current application using the .NET

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.