On 5/10/05, beckpvt <[EMAIL PROTECTED]> wrote: > Moreover, is it possible to restrict data > inside a cell - only numbers, for example?
It is possible, and actually pretty easy. You usually want to set such properties at the column level, so all the ways I've seen such a thing done uses a subclass of DataGridColumn to store the "restrict" and "maxChars" properties. These properties must then be set on the cellEditor (which is a TextInput and supports all the same properties as a TextInput). If you're willing to use a subclass of the DataGrid, then you can overload the setFocusedCell() function to read restrict and maxChars from the appropriate column and set them on the cellEditor. Alternatively, you could set these properties using an event listener on cellFocusIn ... in which case you don't have to use a subclassed DataGrid ... just do "dg.cellEditor.restrict = (whatever)" and "dg.cellEditor.maxChars= (whatever)" ... a little more wiring is involved, so if you're going to be doing a lot of this, I recommend the subclassed DataGrid approach. I've posted some example code that does this (among other things). See http://groups.yahoo.com/group/flexcoders/message/14768 Jim Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

