How much like a spreadsheet do you want it to be?
If you just want every cell to be editable, does setting the
'editable' attribute on the DataGridColumn to 'true' not do the trick
for you?
If you wish to implement formulas and automatic 'trickle-on' updating
of cells references in formulas.... you have a number of problems:
1) you'll need to customise your itemRenderer so that
a) each cell represents an object containing a formula and the
current value of the cell, and
b) when the event that represents when the cell's content
has changed is fired, you begin a recursive evaluation of
the formula (with respect to referenced cells and their
formulae).
2) eval() has been removed from ActionScript 3.0, so you'll need to
implement a parser and evaluation engine for whatever language
you choose for formulas.
3) you'll probably need to implement cycle-detection to prohibit
infinitely (possibly mutually) recursive formulae (or implement
laziness/iterators if you support that).
4) you'll probably need to break up the evaluation into blocks of
work (some recursion wrapper using a counter and callLater) to
ensure that the user interface is updated often enough.
-David
--- In [email protected], "Mark Ingram" <[EMAIL PROTECTED]> wrote:
>
> Hi, I want to be able to type into any row of a datagrid and enter new
> data. How easily can this be done?
>
>
>
> Mark
>