Item Renderer for Advance DataGrid

On AdvancedDataGrid, can we  display one of the column as Text and when the user clicks on the text it should turns into a combo box.
When the user clicks on any where else it should turn into text back.
Please help me to implement this.

Off the top of my head it's probably something like:
<mx:DataGrid id="dg1" width="100%" height="100%">
<mx:columns>
<mx:DataGridColumn dataField="Example">
<mx:itemEditor>
<mx:Component>
<mx:ComboBox>
<mx:String>1</mx:String>
<mx:String>2</mx:String>
<mx:String>3</mx:String>
</mx:ComboBox>
</mx:Component>
</mx:itemEditor>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
edit:
Just checked, Subeesh's example: http://blog.flexmonkeypatches.com/2008/02/18/simple-datagrid-combobox-as-item-editor-examp le/ has got a very good example on it. Pretty much exactly what you asked

Similar Messages

  • Two item renderer for one datagrid column?

    hi
    i have one doubt
    can we use two item renderer for one datagrid column
    any possibilities
    why i am asking this because
    during drag and drop i need one itemrenderer and during application initialization i need another itemrenderer
    any possibilities
    karthik.k

    Hi,
    I think your requirement can be completed by using ViewStack you can pass selected index to it according to requirement.
    See:
    <itemRenederer ...
         <viewstack selectedIndex = 0 ...>
              <vBox id="vBox1" >
                        Your 1st itemrenderer will come here....
              </vBox>
              <vBox id="vBox2" >
                        Your 2nd itemrenderer will come here....
              </vBox>
         </viewStack>
    </itemRenederer>
    You have to just toggle selectedIndex.
    Thanks

  • Item renderer for specific rows

    I need to have a checkbox item renderer for a spark datagrid column. I am using the following to get an item renderer into column:
    var checkBoxRenderer:ClassFactory = new ClassFactory(GridCheckBoxItemRenderer);
    column.itemRenderer = checkBoxRenderer;
    My question is if I need to show a checkbox for specific rows can I do that without going into GridCheckBoxItemRenderer's source code?
    Thanks

    Hi Zolotoj ,
    Please go through following links :
    http://stackoverflow.com/questions/1952940/show-itemrenderer-in-specific-datagrid-rows-oth ers-empty
    http://www.flexer.info/2009/01/09/different-rows-in-datagrid-programmatically-added-itemre nderers-classfactory-and-ifactory/
    It will provide you some idea to how to proceed further for this problem.
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • Item Renderer for DataGrid

    I have a button component as a Item renderer in the column of
    the datagrid .
    I am not able to access the Itemrenderer component(which I
    declared in other mxml file in the datagrid)
    This is the data grid where I have the Itemrenderer:
    <mx:DataGrid id="dgCondition1"
    variableRowHeight="true" width="100%" height="150"
    verticalScrollPolicy="auto" editable="true"
    dataProvider="{initDataGrid_Create}" >
    <mx:columns>
    <mx:DataGridColumn headerText="" dataField="conditi"
    />
    <mx:DataGridColumn headerText="Condition"
    dataField="syntax" width="300" />
    <mx:DataGridColumn headerText="1" dataField="value"
    width="80" editable="false" itemRenderer="buttonRenderer"/>
    <mx:DataGridColumn dataField="value" headerText="2"
    itemRenderer="buttonRenderer" />
    I created a new mxml component for this button component
    .(buttonRenderer.mxml)
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="400" height="300">
    <mx:Script source="..TableDataGridBtn.as" />
    <mx:Button id="col1" label="" width="75"
    click="getDetail(event,col1)" />
    </mx:VBox>
    The Problem is I am not able to access the buttonRenderer in
    the datagrid itemRenderer tag .
    It says "Access of Undefined Property buttonRenderer".

    "nash99" <[email protected]> wrote in
    message
    news:g7alc5$nkd$[email protected]..
    > So
    > Is it that I can Use this ItemRenderer tag in the
    Application Tags only
    > Is there any other way I can use them in mxml components
    because I am
    > using
    > the same button in 16 datagrid columns , I dont wan't to
    make the code
    > look
    > redundant.
    http://www.adobe.com/livedocs/flex/3/html/help.html?content=intro_3.html

  • Item Renderer in Advanced Data Grid

    I have checkbox against each folder in the datagrid and
    binded to XMLListCollection. When the value in the field is true, i
    want that checkbox to be selected. Its not working. Here is the
    code. I want to know how item render is working in AdvancedDataGrid
    Thanks in advance.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="vertical">
    <mx:Script>
    <![CDATA[
    import mx.collections.HierarchicalData;
    import mx.collections.XMLListCollection;
    ]]>
    </mx:Script>
    <mx:XMLList id="dpHierarchyXML" >
    <Clegs>
    <Cleg name="Cleg1" sel="true">
    <FlightLeg createdDate="10/10/2008"
    effectiveDate="10/10/2008"
    endDate="10/10/2008" modifiedDate="10/12/2008"
    station="ATL" carrier="Delta"
    flightNo="9W756" acType="122"
    beginDate="10/10/2008" timeRange="10"
    doop="123" region="XYZ"
    year_duration="0.24" moons="0"
    cost="1250"
    />
    </Cleg>
    <Cleg name="Cleg2" sel="true">
    <FlightLeg createdDate="10/10/2008"
    effectiveDate="10/10/2008"
    endDate="10/10/2008" modifiedDate="10/12/2008"
    station="ATL" carrier="Delta"
    flightNo="9W756" acType="122"
    beginDate="10/10/2008" timeRange="10"
    doop="123" region="XYZ"
    year_duration="0.24" moons="0"
    cost="1250"
    />
    </Cleg>
    </Clegs>
    </mx:XMLList>
    <mx:AdvancedDataGrid
    id="adg"
    dataProvider="{new HierarchicalData(dpHierarchyXML.Cleg)}"
    rowCount="20"
    width="100%"
    treeColumn="{leg}"
    variableRowHeight="true"
    wordWrap="true" dropEnabled="true" dragEnabled="true"
    dragMoveEnabled="true" sortExpertMode="true"
    >
    <mx:columns>
    <mx:AdvancedDataGridColumn dataField="@sel"
    headerText=" " width="25" rendererIsEditor="true"
    editable="true" editorDataField="selected" />
    <mx:AdvancedDataGridColumn dataField="@name" id="leg"
    headerText="cLeg" />
    <mx:AdvancedDataGridColumn dataField="@createdDate"
    headerText="Created Date" />
    <mx:AdvancedDataGridColumn dataField="@effectiveDate"
    headerText="Effective Date" />
    <mx:AdvancedDataGridColumn dataField="@endDate"
    headerText="End Date" />
    <mx:AdvancedDataGridColumn dataField="@modifiedDate"
    headerText="Modified Date" />
    <mx:AdvancedDataGridColumn dataField="@station"
    headerText="Station" />
    <mx:AdvancedDataGridColumn dataField="@carrier"
    headerText="Carrier" />
    <mx:AdvancedDataGridColumn dataField="@flightNo"
    headerText="Flight No" />
    <mx:AdvancedDataGridColumn dataField="@acType"
    headerText="Account Type" />
    <mx:AdvancedDataGridColumn dataField="@beginDate"
    headerText="Begin Date" />
    <mx:AdvancedDataGridColumn dataField="@timeRange"
    headerText="Time Range" />
    <mx:AdvancedDataGridColumn dataField="@doop"
    headerText="DOOP" />
    <mx:AdvancedDataGridColumn dataField="@region"
    headerText="Region" />
    </mx:columns>
    <mx:rendererProviders>
    <mx:AdvancedDataGridRendererProvider columnIndex="0"
    columnSpan="1" depth="1" renderer="mx.controls.CheckBox">
    </mx:AdvancedDataGridRendererProvider>
    </mx:rendererProviders>
    </mx:AdvancedDataGrid>
    </mx:Application>

    2) You do not set an item editor only an item renderer.
    <mx:AdvancedDataGridRendererProvider columnIndex="0"
    columnSpan="1" depth="1" renderer="mx.controls.CheckBox">
    3) You do not have rendererIsEditor on any columns that I can
    see.
    <mx:AdvancedDataGridColumn dataField="@sel"
    headerText=" " width="25" rendererIsEditor="true"
    editable="true" editorDataField="selected"/>
    If I use the itemrender for that column, i am gettting the
    check box for all the rows. Which i dont want . I want check box
    only for the folder node. so i am using renderer provider
    I want only one column to be editable

  • Using a bitmap object as a item renderer in a datagrid

    I have a UIComponent grabbed has a bitmap, and stored in an
    array collection.
    I want to display a thumbnail in a datagrid, I can make a
    itemRenderer for an image with a local or remote file as a source.
    But how do I use the bitmap in the array collection in an item
    renderer.
    Thanks
    Dean

    Here is an example with a HorizontalList:
    <?xml version="1.0" ?>
    <!-- itemRenderers\htlist\myComponents\Thumbnail.mxml
    -->
    <mx:VBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    horizontalAlign="center"
    verticalGap="0" borderStyle="none" backgroundColor="white"
    >
    <mx:Image id="image" width="60" height="60"
    source="{data.image}"/>
    <mx:Label text="{data.name}" width="120"
    textAlign="center"/>
    <mx:Label text="${data.price}" fontWeight="bold"/>
    </mx:VBox>
    <?xml version="1.0"?>
    <!-- itemRenderers\htlistMainlistThumbnailRenderer.mxml
    -->
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Model id="catalog" source="catalog.xml"/>
    <mx:HorizontalList id="myList"
    columnWidth="125"
    rowHeight="125"
    columnCount="4"
    dataProvider="{catalog.product}"
    itemRenderer="myComponents.Thumbnail"/>
    <mx:LinkButton label="Product images courtesy of Lavish"
    click="navigateToURL(new URLRequest('
    http://www.shoplavish.com'),
    '_blank')"/>
    </mx:Application>
    <?xml version="1.0"?>
    <catalog>
    <product id="1">
    <name>USB Watch</name>
    <price>129.99</price>
    <image>assets/products/usbwatch.jpg</image>
    <thumbnail>assets/products/usbwatch_sm.jpg</thumbnail>
    </product>
    <product id="2">
    <name>007 Digital Camera</name>
    <price>99.99</price>
    <image>assets/products/007camera.jpg</image>
    <thumbnail>assets/products/007camera_sm.jpg</thumbnail>
    </product>
    <product id="3">
    <name>2-Way Radio Watch</name>
    <price>49.99</price>
    <image>assets/products/radiowatch.jpg</image>
    <thumbnail>assets/products/radiowatch_sm.jpg</thumbnail>
    </product>
    <product id="4">
    <name>USB Desk Fan</name>
    <price>19.99</price>
    <image>assets/products/usbfan.jpg</image>
    <thumbnail>assets/products/usbfan_sm.jpg</thumbnail>
    </product>
    <product id="5">
    <name>Caffeinated Soap</name>
    <price>19.99</price>
    <image>assets/products/soap.jpg</image>
    <thumbnail>assets/products/soap_sm.jpg</thumbnail>
    </product>
    <product id="6">
    <name>Desktop Rovers</name>
    <price>49.99</price>
    <image>assets/products/rover.jpg</image>
    <thumbnail>assets/products/rover_sm.jpg</thumbnail>
    </product>
    </catalog>

  • Item Renderer in a Datagrid

    I'm struggling with how to make a check mark ( image ) show
    up or not based on the value of some data in each datagrid line
    item. I'm using an item renderer but I'm missing something. Any
    help would be greatly appreciated.
    thanks,
    STeveR

    The following is my entire itemrenderer...please excuse any
    bad style as this is a WIProgress..
    Its probably easier to quote the adobe docs on listdata...If
    a component implements the IDropInListItemRenderer interface, you
    can use its listData property to obtain information about the data
    passed to the component when you use the component in an item
    renderer or item editor..I made sure the component implements the
    interface as you can see in the code at the top of component. Then
    add the couple of required functions regarding listdata, then you
    can access the listdata in your own functions in the renderer, like
    i do in set data function.
    this.BTN_***_mark.label =
    value[DataGridListData(listData).dataField];
    this line assigns the value from my datagrid to the renderers
    button label. (this renderer is a button that the user can press)
    so i want the buttons label to show the value coming in from the
    datagrid. So listdata is just a way to
    explicitly get the column name where the current data is
    being sourced from in your datagrid.As the grid is being rendered,
    it renders row by row. In each row it goes thru your columns . SO
    initially it for row 1 it would begin rendering firstname, surname,
    mark, average...etc etc. If i put an alert in on
    value[DataGridListData(listData).dataField
    I would see these column names popping up as they are getting
    rendered in the DGrid.
    Hope this helps...
    <!-- <?xml version="1.0" encoding="utf-8"?>-->
    <mx:VBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()" width="74" height="30"
    horizontalAlign="center" verticalAlign="middle"
    implements="mx.core.IFactory,mx.controls.listClasses.IDropInListItemRenderer">
    <mx:Metadata>
    </mx:Metadata>
    <mx:Script>
    <![CDATA[
    import mx.managers.PopUpManager;
    import mx.controls.DataGrid;
    import mx.utils.ArrayUtil;
    import mx.collections.ArrayCollection;
    import mx.collections.IViewCursor;
    import mx.controls.Alert;
    import mx.events.*;
    import mx.controls.dataGridClasses.DataGridListData;
    import mx.controls.listClasses.BaseListData;
    import mx.controls.dataGridClasses.DataGridColumn;
    import mx.containers.TitleWindow;
    private var panel:AssessmentMarkPopup = new
    AssessmentMarkPopup();
    var the_val = 0;
    var col_index:int;
    private var _listData:BaseListData;
    public function get listData() : BaseListData
    return _listData;
    public function set listData( value:BaseListData ) : void
    _listData = value;
    private function showLoginForm():void {
    var pop:AssessmentMarkPopup =
    AssessmentMarkPopup(PopUpManager.createPopUp(this,AssessmentMarkPopup,true));
    pop.addEventListener("closepopup",onClose);
    pop.TXT_***_mark.text = this.BTN_***_mark.label;
    var row:int =
    this.parentApplication.DG_class_students.selectedIndex;
    pop.student_name =
    this.parentApplication.DG_class_students.selectedItem.firstname + "
    " + this.parentApplication.DG_class_students.selectedItem.lastname;
    private function onClose(e:MyClosePopupEvent):void{
    this.BTN_***_mark.label = e.data.mark;
    public function newInstance():*
    return new MarkEntry();
    public override function get data():Object
    return super.data;
    override public function set data(value:Object):void {
    var dg:DataGrid = (listData) ? DataGrid(listData.owner) :
    null;
    var column:DataGridColumn = (dg) ?
    dg.columns[listData.columnIndex] as DataGridColumn : null;
    col_index = listData.columnIndex;
    var str:String = String(column.dataField);
    this.BTN_***_mark.label =
    value[DataGridListData(listData).dataField];
    ]]>
    </mx:Script>
    <mx:Button click="showLoginForm()" id="BTN_***_mark"
    width="52"/>
    </mx:VBox>

  • Generic item renderer for Adv DG Columns?

    Hello,
    I'm trying to create a generic ItemRenderer for my Adv DG so that so that I can put a toolTip on the cells.
    The Adv DG Column object doesn't have a toolTip property so I'm creating my own renderer...
    As far as I'm aware I have to create an ItemRenderer that knows the fieldName that it is rendering so I can use {data.myFieldName}. I was hoping there was a property so that I can reference the value generically such as {data.text} but this obvisouly doesn't work...
    Is there anyway around this? Can I pass a paramater to the itemRenderer? I'm doing it like this...
    advancedDataGridColumn.itemRenderer = new ClassFactory(renderers.ToolTipFieldRenderer);
    Alsok, there is a toolTip property of the AdvDG but the columns, what is the AdvDG.toolTip used for? Just a general toolTip? The reason why I need a toolTip is our client has asked to be able to mouse-over the cell to see the full value where the field value is chopped because it's too long for the column...
    Hope that makes sense and hope you can help...
    Cheers,
    Nick

    The AdvancedDataGridColumn class has dataTipField and dataTipFunction
    properties and these are supported by the default item renderer
    (AdvancedDataGridItemRenderer), which is also generic. Here's an example:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="absolute">
      <mx:Script>
          <![CDATA[
             import mx.collections.ArrayCollection;
             private var dpADG:ArrayCollection = new ArrayCollection([
          ]]>
        </mx:Script>
        <mx:AdvancedDataGrid
            height="400"
            width="300"
            sortExpertMode="true"
            dataProvider="">
            <mx:columns>
                <mx:AdvancedDataGridColumn
                    dataField="Artist"
                    dataTipField="Artist"
                    showDataTips="true" />
                <mx:AdvancedDataGridColumn
                    dataField="Album"
                    dataTipField="Album"
                    showDataTips="true" />
                <mx:AdvancedDataGridColumn
                    dataField="Price"
                    dataTipField="Price"
                    showDataTips="true" />  
            </mx:columns>
       </mx:AdvancedDataGrid>      
    </mx:Application

  • Need help coneverting data provider for inline fx:Component renderer for a datagrid

    I want to use an existing inline item renderer and point the hard coded data provider to an arraycollection, which comes from a database.
    At firt glance this looks easy, just change
    <fx:Declarations>
      <fx:Component id="inlineEditor">
       <mx:ComboBox >
        <mx:dataProvider>
         <fx:String></fx:String>
         <fx:String>AIG</fx:String>
         <fx:String>BHN</fx:String>
         <fx:String>FH</fx:String>
         <fx:String>LM</fx:String>
         <fx:String>SD</fx:String>
        </mx:dataProvider>
       </mx:ComboBox>
      </fx:Component>
    </fx:Declarations>
    TO
    <fx:Declarations>
      <fx:Component id="inlineEditor">
       <mx:ComboBox
        dataProvider="{outerDocument.wripAttachTypeAc}"
        labelField="WRIP_ATTACHED_FILE_TYPE_DESC">
       </mx:ComboBox>
      </fx:Component>
    </fx:Declarations>
    BUT that does not work the data grid produces the object.object value as theres no association to the labelField . Can anyone see what I am doing wrong. The datagrid entry is
    <mx:DataGridColumn dataField="Permit File"
              width="150"
              editorDataField="selectedItem"
              itemEditor="{inlineEditor}"/>

    Thanks Harui, but it doesn't help. If the border is set it will help, but the very big problem is the empty rows that appear at the end of the datagrid... I can't find a way of measuring correctly the height of the itemRenderers!
    I'll update this thread if I manage to do it.

  • Hiding item renders in Group Datagrid Label Rows?

    I have an Advanced data grid displaying a grouped collection.  I have an item renderer in one column the is a canvas with a button that is bound to the data.
    However, buttons are also showing on the header rows, where they are not needed (see below).  How do I fix this?

    I have an Advanced data grid displaying a grouped collection.  I have an item renderer in one column the is a canvas with a button that is bound to the data.
    However, buttons are also showing on the header rows, where they are not needed (see below).  How do I fix this?

  • Multi-Use Item Renderer for DataGrid Column

    I have a dataGrid where the first column of the grid displays
    an icon for the 'type' of item in the row. I created a custom
    itemRenderer component which I reference in its own namespace, and
    everything works great. Since this is a pretty common concept, I'd
    thought that I'd be able to re-use that itemRenderer throughout the
    application, but everytime I try to call the itemRenderer in
    another dataGrid, I get 2 errors saying "the inlineComponent could
    not be found" and then because of that "Access of undefined
    property".
    It doesn't make sense for an itemRenderer to be only good for
    one use, so I'm obviously missing some fundamental issue. Can
    someone enlighten me?

    Hah, found it. It is an mxml example, and implements
    IDropInListItemRenderer. It for an image renderer, but you will be
    able to see what to do.
    Tracy
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    horizontalAlign="center" verticalAlign="middle"
    width="16" height="16"
    implements="mx.controls.listClasses.IDropInListItemRenderer"
    >
    <mx:Script><![CDATA[
    import mx.controls.listClasses.IDropInListItemRenderer;
    import mx.controls.listClasses.BaseListData;
    import mx.controls.dataGridClasses.DataGridListData;
    import mx.controls.DataGrid;
    [Bindable]
    private var source:String;
    private var _listData:BaseListData;
    public function get listData():BaseListData
    return _listData;
    public function set listData(value:BaseListData):void
    _listData = value;
    invalidateProperties();
    override protected function commitProperties():void
    super.commitProperties();
    if (_listData is DataGridListData)
    var dgld:DataGridListData = _listData as DataGridListData;
    source =
    data[DataGrid(dgld.owner).columns[dgld.columnIndex].dataField];
    ]]></mx:Script>
    <mx:Image source="{source}"/>
    </mx:VBox>

  • How to dispatch custom events from an item renderer used for Datagrid Column

    Hi,
    I am using an Item Renderer for a Data Grid Column and in that mxml, I am dispatching a custom event with data.
    But the main mxml which has the DataGrid is not able to resolve the event. How can I solve this?
    Thanks

    Hi,
    This is the constructor for Event.
    public function Event(type:String, bubbles:Boolean  = false, cancelable:Boolean  = false)
    When you created your custom event after extending from Event, for the parent container receives the event, the bubbles property must be set to true.
    Please check if you have done so. That should solve the problem. Let me know if it doesn't.
    Nishad

  • Datagrid Drop Down Item renderer Scroll Problem

    Hi,
    I am having a problem with an drop down item renderer on a Datagrid.  When ever the datagrid is displayed and the cell is clicked on i want this to display a drop down list of objects.  I can get the drop down to appear with the list of objects.  H
     owever the scrollbar does not work on this item to allow the user to scroll through all the objects.  If you use the mouse wheel you can scroll down through them all but not when you try and click on the scroll bar to drag down.  Below is the code used.  Any advice why this might be happening?? 
    <mx:DataGridColumn headerText="Widget"
    dataField="WidgetName"
    editable="true"  headerWordWrap="false" textAlign="center" width="100"
    editorDataField="Widget">
    <mx:itemEditor>
    <fx:Component>
    <s:MXDataGridItemRenderer focusEnabled="true" height="22" >
    <fx:Script>
    <![CDATA[               
    import mx.events.FlexEvent;
    import spark.events.IndexChangeEvent;
    private var selectedWidget:Widget = null;
    public function get ccyPair():String {
    return  ddlCcyPairs.selectedItem.Widget;
    override protected function commitProperties():void {
    super.commitProperties();                
    trace("Commit .......");
    protected function ddlCcyPairs_changeHandler(event:IndexChangeEvent):void {
    for each(var ccyP:CurrencyPair in ddlCcyPairs.dataProvider) {
    if (ccyP.ccyPair == ddlCcyPairs.selectedItem.ccyPair) {
    selectedWidget = ccyP;
    ddlCcyPairs.selectedItem = selectedWidget;
    protected function ddlCcyPairs_creationCompleteHandler(event:FlexEvent):void {                 
    for each(var ccyP:CurrencyPair in ddlCcyPairs.dataProvider) {
    if (ccyP.ccyPair ==  data.ccyPairName) {
    selectedWidget = ccyP;
    ddlCcyPairs.selectedItem = selectedWidget;
    ]]>
    </fx:Script>
    <s:DropDownList id="ddlWidgets" width="100%"
    dataProvider="{parentApplication.Widgets}"
    labelField="name"              
    selectedItem="selectedWidget"
    creationComplete="ddlWidgets_creationCompleteHandler(event)"
    change="ddlWidgets_changeHandler(event)"/>
    </s:MXDataGridItemRenderer>
    </fx:Component>
    </mx:itemEditor>
    </mx:DataGridColumn>

    Hi, Post a test code.... It will be a lot easier to help you Mich

  • Item renderer on DataGrid (not DataGridColumn)

    It seems that all the published examples of using an item renderer on a DataGrid use the itemRenderer property of DataGridColumn.
    I don't think I can do this because my columns are created at run time, depending on the contents of the data provider.
    I have therefore tried to assign my item renderer (a subclass of Canvas) directly to the DataGrid.
    1. This works in MXML when the renderer is inline.
    2. It sees to work when the renderer is an Actionscript class assigned to the DataGrid's itemRenderer property.
    3. It does NOT work when the renderer is Flex component assigned to the DataGrid's itemRenderer property. This compiler error is reported: Initializer for 'itemRenderer': cannot parse value of type mx.core.IFactory from text 'comp:CellRenderer'.
    I prefer to use the last method. Is there a way to fix this error?
    If not, is it possible to attach the item renderer to each DataGridColumn as it is created? DataGrid does not seem to have a suitable event that reports when a column is created.
    Aplogies if this is elementary stuff. I am a real Flex newbie. I am using Flex Builder 3.0
    Andy Kirkham

    A code example would be helpful here, but from your error message it
    looks like you may be doing the following
    <mx:DataGrid itemRenderer="comp:CellRenderer"/>
    Instead of  this, you need to use the fully qualified class name of
    CellRenderer, eg.
    com.renderers.CellRenderer
    Look at the definition of 'comp' towards the top of your MXML file, it
    will be something like:
    xmlns:comp="blah.blah.blah.*"
    Your itemRenderer property should then be set to:
    blah.blah.blah.CellRenderer

  • Datagrid item renderer destroys on mouse over

    Hi,
         I used Flex 3.5 datagrid. I used item renderes in my datagrid. and i set 'rendererIsEditor = true'.
         Everything is very smooth and good. But somtimes my datagrid acting badly. When i put cursor on itemRenderer, It open-up for
    editing. When i move mouse, item renderer destroyed.
         Once it happens it is the default behaviour of my datagrid. No editing can be performed.
          But i can not reproduce it always. sometimes it a happens.
          please help me. anybody know about this?

    Simplify your test case.  Try using a simple TextInput as the renderer and
    see if you have the same problem.

Maybe you are looking for