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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:17:56+00:00 2026-05-15T15:17:56+00:00

How can I validate the cells in a DataGridColumn individually? (ActionScript 3.5) The validation

  • 0

How can I validate the cells in a DataGridColumn individually? (ActionScript 3.5) The validation is configured per-cell, based on fields in the given row. For example

FIELD               VALUE   TYPE
age                 13      Integer
height              13x3    Integer
registered          true    Boolean
temperature         98.G6   Float

In this case, of course 13×3 and 98.G6 would be invalid.

It’s easy to write a Validator ; and to access the data provider objects.

But how do I get individual access to the GUI cell objects so I can set the errorString on an individual cell, either directly or through a Validator?

The itemRenderer/ TextInput control is re-used across the cells for performance reasons, so accessing the GUI-level objects is tricky.


Edit

Answers:

  1. One way to validate and display the invalidation markings, but not per-cell, is to validate all data-provider objects and then set the errorString on the entire grid.

  2. One way to validate per-cell is on the itemEditEnd event handler. (See these pages A B C D). One disadvantage is that it only allows access to the cells from the “inside”, not in an action that validates the grid on command.

  3. A custom itemRenderer is another possibility, as in the answer below, but like 3 above, it only allows access to the cells from the “inside”, not in an action that validates the grid on command.

  4. See Richard Haven’s answer below.

  5. And here’s how to access the GUI objects: The list of relevant GUI objects is a protected field; so you can access it by subclassing, then iterate over the GUI-components which represent the cells and set the errorString on each one.

  • 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-15T15:17:56+00:00Added an answer on May 15, 2026 at 3:17 pm

    If you are looking for arbitrary validation (e.g. on a button or page navigation) rather than immediate navigation (e.g. on cell exit or end-of-edit), then the data is in the underlying dataProvider. I would do validations there rather than dig around inside the grid.

    You can add a flag to the data item so the item renderer displays it as an error (or use an external list to flag it).

    Cheers

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

Sidebar

Related Questions

I want to write a function which can validate a given value (passed as
How can I validate a South African cell phone number? The number must start
You can validate a model object with EF 5 Code-First like that: var validationResult
I am looking for a Java framework which can validate order of elements in
I have vote and votedown tables for posts. I can validate uniqueness within the
Can I validate a form on button click without submitting the whole form using
How can i validate the text length of the element that has an attribute.
How can i validate content of a input box? that when a user for
How can I validate file size from client side. It can be controlled via
How can I validate an XML file against a DTD that is stored locally

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.