Not sure....can you create a little test app, to demonstrate the problem (doesnt have to be a dynamically created datagridcolumn).
are you saying the combobox renderer should be set to the datagrid's dataprovider? if that the case, one solution might be to create your own myComboBox (extending a ComboBox) and you override the data setter function. ...or someone else might have a better idea. regards bod --- In [email protected], "Daniel" <[EMAIL PROTECTED]> wrote: > > That was really helpful! I thank you for that. > > However, when I do this: > > --------- > var dataprovider:Array = > [{label:"algoA1",data:"algoA1"},{label:"algoB1",data:"algoB1"}]; > > columna.rendererIsEditor = true; > var combo:ClassFactory = new ClassFactory(ComboBox); > combo.properties = {dataProvider:dataprovider} > columna.itemRenderer = combo; columna.editorDataField="selectedItem"; > ---------- > > For some reason the selectedItem attribute in the ComboBox doesn't > work as editorDataField. This means that when de data is loaded, no > value is selected according to the value of the dataProvider. > > Any ideas? > > Thanks! > > > > --- In [email protected], "bhaq1972" <mbhaque@> wrote: > > > > 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 [email protected], "Daniel" <danboh@> 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 [email protected], "bhaq1972" <mbhaque@> wrote: > > > > > > > > > var aux:TextInput = new TextInput(); > > > > > > > columna.itemRenderer = aux as IFactory; > > > > > > > > can you do this instead > > > > > > > > columna.itemRenderer = new ClassFactory(TextInput); > > > > > > > > > > > > > > > > --- In [email protected], "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/

