actionscript 3 - Using validators in DataGrid - Flex -
I have an editable data grid, such as something:
& lt; Mx: DataGrid Editable = "True" Detector = "{arrayListPreferences}" id = "Preferences Grid" & gt; & Lt; Mx: column & gt; & Lt; Mx: DataGrade column header = "call1" datafile = "priority" editable = "wrong" /> & Lt; Mx: DataGrade column header = "call2" datafile = "value" edit = "true" /> & Lt; / Mx: column & gt; & Lt; / Mx: DataGrid & gt;
When a user edits the data, then it is a button in which he calls a function that saves the data to the database, and in this function, send data to Must have to validate. I want to use simple validators (NumberValidator, StringValidator, etc.), but I do not know how to set the source of this valitor in the rows specified in the second column.
& lt; Mx: numberValidator source = "{preferencesGrid.selectedItem}" property = "value" integerError = "enter integer value" minValue = "18" maxValue = "50" domain = "int" trigger = "{savebutton}" trigger avent = "Click" Valid = "SaveData"; " />
Set the Validator's Properties
for the desired dataField
column.
Comments
Post a Comment