you will need to do little bit more. try this var textbox:ClassFactory = new ClassFactory(TextInput); textbox.properties = { text:"Write something here..." };
columna.itemRenderer = textbox; columna.rendererIsEditor=true; etc or you could always put "write something here..." into a global variable; create a myTextInput component which assigns the global variable string during the intialize event . --- In flexcoders@yahoogroups.com, "Daniel" <[EMAIL PROTECTED]> wrote: > > Ok, I get your idea, however, what if I need a custome component to be > placed in the itemrenderer, so I can dynamically assing it special > feature? Lets say I want to set the text attribute to "Write something > here..." when the component initializes. > > Thanks! > > --- In flexcoders@yahoogroups.com, "bhaq1972" <mbhaque@> wrote: > > > > > var aux:TextInput = new TextInput(); > > > columna.itemRenderer = aux as IFactory; > > > > can you do this instead > > > > columna.itemRenderer = new ClassFactory(TextInput); > > > > > > > > --- In flexcoders@yahoogroups.com, "Daniel" <danboh@> wrote: > > > > > > Hello! > > > > > > This time Im trying to assing an itemRenderer to a DataGridColumn > > > using this: > > > ---------- > > > var columna:DataGridColumn = new DataGridColumn(); > > > columna.headerText = "something" > > > columna.dataField = "something else" > > > columna.editable = true; > > > columna.rendererIsEditor = true; > > > > > > var aux:TextInput = new TextInput(); > > columna.itemRenderer = aux as > > > IFactory; > > columna.editorDataField="text"; > > > ---------- > > > > > > The above code doesnt work, although it doesnt present any errors. > > The > > > reason why I need to do that this way is that I can dynamically > > change > > > properties in the itemRenderer. > > > > > > Any Ideas???? > > > > > > Thanks! > > > > > > -- 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 <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> 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/