Avatar of ganands

asked on 

Flex Datagrid Cell Validation

I am new to flex. Following is what I am trying to do.
1. Datagrid with 6 columns
2. Out of the 6 columns, 2 columns are combobox
3. I have 2 categories of validation for the values entered in the cell.
    a. Some simple validation like value entered cannot be null or empty
    b. Validation that requires remoteservice call to the backend i.e. I enter a value in the cell, then the value is sent to backend database to see if it is valid and then brings back some related information.

Now, the problem I am facing is that :
1. error message is displayed on the next cell if it is the second time. i.e I enter null in a cell, I tab out, it correctly displays the error message "Value cannot be null". I enter some value in the same cell, which goes to backend and then comes back and displays "Not a valid value", which is correct, but the message is displayed on the next cell.
Basically, I am not sure if I am using Preventdefault correctly
or a sample code for a similar situation would be great.
I am attaching the 2 pieces of code (i.e 2 mothods)

Adobe FlashApache Flex

Avatar of undefined
Last Comment

8/22/2022 - Mon