Hi again,
Sorry for the late reply.
Actually I am using an item editor component. I'm creating a datagrid
dynamically with ClassFactory items and passing the properties
( because as I know item editor objects are created when you are in
edit mode). The problem here, is that everytime the item editor is
created, it loses its previous value.
Do you have any idea how to keep the value set before when I start the
edit mode?

Thanks,


On 11 fév, 21:07, Shaleen Jain <[email protected]> wrote:
> Hello Zied,
>
> I really don't understand why you are going for an inline editor. In
> your scenario, I would suggest using component editor.
> Also not sure how you are using class factory for an inline editor.
> You have to make another editor component
> Once you make a component, you no longer required to access it using
> outerDocument. directly access it using class instance.
>
> Let me know if that solves you purpose, or you have  some special need
> to use inline only (though I  don't think of any such requirement)
>
> My pleasure, you understand my posts valuable.
>
> Thanks,
> Shaleen Jainhttp://shaleenjain.blogspot.com
>
> On Feb 11, 3:32 pm, zied <[email protected]> wrote:
>
> > Hello Shaleen,
> > Thank you for you reply and your valuable links, they were very
> > helpful.
> > In my case, I am using an inline itemEditor:
>
> > <cc:CustomDataGridColumn dataField="field1" editorDataField="xData"
> > showDataTips="true" customDataTipFunction="setColumnToolTip">
> >         <cc:headerRenderer>
> >                 <mx:Component>
> >                         <cc:HeaderRenderer 
> > text="{outerDocument.getMsg('header.field1')}"/>
> >                 </mx:Component>
> >         </cc:headerRenderer>
> >         <cc:itemEditor>
> >                 <mx:Component>
> >                         <cc:DictionaryEditor 
> > dataProvider="{outerDocument.getDS('field1',
> > '').lastResult.labelField.id}" setData="{data['field1']}"
> > toolTip="field1" toolTipFunction="{outerDocument.setToolTip}"/>
> >                 </mx:Component>
> >         </cc:itemEditor>
> > </cc:CustomDataGridColumn>
>
> > My problem is to transform the creation of the datagrid from static to
> > dynamic, so I have to get the properties of the itemRenderers and
> > itemEditors from an XML file and according to these properties I will
> > create a dataGrid. I found that I have to create a ClassFactory and
> > fill the ClassFactory's properties, for example:
> > var hr:ClassFactory = new ClassFactory(HeaderRenderer);
> > hr.properties={text:getMsg(datagriddesc.colu...@headertext[pname])};
> > customDataGridColumn.headerRenderer = hr;
>
> > Here comes the real problem, in the case of an itemEditor, how can I
> > establish the binding of dataProvider to outerDocument.getDS
> > ('field1',' ').lastResult.labelField.id and pass it to the
> > ClassFactory.properties using actionScript language.
>
> > Thanks,
> > Zied Majdoub
>
> > On 10 fév, 20:39, Shaleen Jain <[email protected]> wrote:
>
> > > I guess you are writing an inline itemEditor,
>
> > > you may write it something like this
>
> > > <mx:DataGridColoumn other properties ... .>
> > > <mx:ItemEditor>
> > > <mx:component>
> > > <mx:Combobox dataprovider{outerDocument.getDS
> > > ('dictionnary',subtype'').}  other properties... />
> > > </mx:component>
> > > </mx:ItemEditor>
> > > </<mx:DataGridColumn>
>
> > > if you are using your combobox editor frequently, I would suggest you
> > > to make a component instead of using inline.
>
> > > Thanks,
> > > Shaleen Jainhttp://shaleenjain.blogspot.com
>
> > > On Feb 11, 12:33 am, Shaleen Jain <[email protected]> wrote:
>
> > > > Hello Zied,
>
> > > > here is a small piece of code, which I guess able to fulfill your
> > > > requirement
>
> > > > say you have put your custorm itemEditor in myEditors folder, and the
> > > > file name of your comboBox editor is myComboBoxEdior, then you will
> > > > mention it in the grid column something like this
>
> > > > <mx:DataGridColumn dataField="someDataField"
> > > >         itemEditor="myEditors.myComboBoxEditor"
> > > >         editorDataField="selectedLabel"
> > > >         />
>
> > > > put any value against editorDataField which  you want to pass back to
> > > > the gridcolumn which then become the new value of the edited item.
> > > > It could be anything you define or component default properties.
>
> > > > Let me know if you face any issue.
>
> > > > Also I started a new series of item renderers and item editor on my
> > > > blog. I guess you may like to read them.
>
> > > >http://shaleenjain.blogspot.com/2009/02/item-renderes-item-editors.ht......
>
> > > > Thanks,
> > > > Shaleen Jainhttp://shaleenjain.blogspot.com
>
> > > > On Feb 10, 10:49 pm, zied <[email protected]> wrote:
>
> > > > > Hi,
> > > > > I am trying to create dynamically my dataGrid with actionScript which
> > > > > was created statically withMXML. I want to know how to create an
> > > > > itemEditor of a column with a custom object (ComboBox) that has as
> > > > > data provider="{outerDocument.getDS('dictionnary',
> > > > > '').lastResult.labelField.id}"
> > > > > getDS(dictionnary,subtype) returns an XML that populates my ComboBox.
> > > > > Thank you for helping
>
> > > > > Best Regards,

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to