Datagrid item editors and dynamic behavior (part 3/3)

we're ready to wrap up our functionality now.

in part 1, we defined our problem (validated error reporting in a datagrid cell, plus dynamic validation characteristics) and made a first attempt at a solution.

in part 2, we improved our error handling in the cells.

now, in part 3, we'll expand our validation logic beyond valid numbers to range checking based on other XML data in the row. this will fulfill our task of creating item editors with dynamic behavior.

[More]

Datagrid item editors and dynamic behavior (part 2/3)

picking up from where we left off in part one, now we want to to improve our user notification when they enter a bad value in our datagrid.

previously, we jumped out of the cell and left it blank. ideally, we want our cell, whose itemEditor is a derived class of TextInput, to behave like a TextInput with bad data. i.e. we would like a red border and an errortip.

[More]

Datagrid item editors and dynamic behavior (part 1/3)

though a lot of validation functionality is available in mxml through validators, i've always found it curious that Datagrid seems to be a bit short-changed.

for example, in mxml, i can create a TextInput and give it the ability to accept ranges of numbers, through both the restrict property and assigning it a NumberValidator, but how do we do the same in a Datagrid cell?

further, what happens when we want to dynamically process cell contents based on other data in the same row?

Adobe has a primer here: http://www.adobe.com/devnet/flex/quickstart/creating_item_editors/

... with help on creating different kinds of item editors. but whenever they give an example of a cell into which you're meant to enter numbers, they use a NumericStepper. and that's great, but maybe i don't always want to use a NumericStepper in my interface. maybe i want to use a TextInput component, just like the rest of the cells. further, we still haven't addressed the kinds of dynamic behavior i mentioned above.

so what's the solution?

[More]

BlogCFC was created by Raymond Camden. This blog is running version 5.9.001.