Hi, thanks for the response. I meant like a spreadsheet as in I can type
into any cell I like. If you just imagine I have a data provider setup
with {Monday, 1}, {Tuesday, 2}. The data grid will contain 2 rows (and 2
columns). How can I get it so that I can click on the 3rd row and just
type "Wednesday"?I hope you see what I mean. I would just like to click on any cell and edit the contents. Cheers, Mark -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of powertool786 Sent: 05 June 2007 15:30 To: [email protected] Subject: [flexcoders] Re: Make datagrid into spreadsheet 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 > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links

