actionscript 3 - Validate DataGridColumn cells individually -


How can I personally verify cells in a DataGridColumn? (Action Script 3.5) authentication counter-cell is configured, depending on the field in the given row. For example

  field VALUE type age 13 integer height 13x3 integer registered boolean temperature 98.G6 float  

In this case, definitely 13x3 and 98 G6 will be invalid

validator is easy to write; And to access data provider objects.

But how can I get different access to GUI cell objects so that I can set errorstring on individual cells, either directly or validator ?

The item renderer / text input control is reused for performance reasons, so GUI-Livel objects are difficult.


Edit

Answer:

  1. There is a way to display and display marked markings, but Not a per-cell, to validate all data provider objects and then set the error string to the whole grid.

  2. The per-cell item is on the Edit and event handler (see these pages) One disadvantage is that it only "From" to cells It does not allow access, it does not accept the grid in an order.

  3. There is another custom itemandender , as is the answer given below, but like up to 3, it only reaches cells from "inside" Allows, and not in any action that agrees to the grid on the command.

  4. See Richard Heaven's answer below.

  5. And here is: The list of related GUI objects is a protected field; You can access it by sub-clinging, then iterate over the GUI components that represent cells and set error string

    on each

If you are looking for verification of arbitrary (for example, on a button or page navigation ) Instead of instantaneous navigation (for example, for cell exit or end editing), then the data In the underlying detection I will do the assumptions instead of digging around the grid.

You can add a flag to the data item, so that the item renderer shows it as an error (or to flag).

Cheers


Comments