Custom pegging component for data grid in flex

A pegging component useful when you want to display a limited amount of data in datagrid.
<code>
<pagging:Pagging id="pagging" size="15" ui="{dataGridRef}" dp="{data}" />
</code>

Flex Builder 2 uses Actionscript 3.
You will need to write a renderer for for this column.
There are a lot of examples of datagrids with images in them.
here is one from the livedocs
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Live Docs_Book_Parts&file=cellrenderer_072_28.html

Similar Messages

  • Dump in Value-Help Component for date

    I created a Value-Help-Component for date fields. (I cannot use the standard value help, because I need the help to start in the month, the user is working on).
    I am using the Date Navigator to select a date.
    If I first change the month with an arrow of the date navigator and then select a date I get a dump in the method IF_WD_CONTEXT_ELEMENT~GET_ATTRIBUTE_REF in line
        attr_info = me->node_info->if_wd_context_node_info~get_attribute( name_only ).
    , because the element does not have a node_info.
    If I just choose a date in the preselected month (without using the arrows of the date navigator) everything is fine.
    Does anybody have an idea??
    Many thanks in advance.

    I found the "solution" to the problem myself.
    I used the method bind_structure in the component containing the date navigator.
    After I replaced it by set_static_attributes it worked without producing dumps.
    Very strange!

  • "advanced data grid"  with flex builder 3.0

    I'm getting watermark as "Flex Data Visualization
    Trial" when tried to use advances data grid with flex builder 3.0. There are some links floating on the internet where it's suggested that the license key should be provided in the flex-config.xml to avoid this issue. I would like to know if this componenet is stable with flex builder 3.0 and is it ok to use this in production environment?

    Someone from Adobe might be able to answer more definitely
    but it's probably just not considered compatible with a modified
    Eclipse (at least, the installer). It may just be the installer
    blowing up when it shouldn't. I think Adobe doesn't want to support
    install configurations that they don't have setup and tested. I had
    a similar issue once and solved it by doing the following... not
    sure if it'll work, and it's more of a last resort:
    Setup a regular eclipse install - install the plugin there.
    Somehow, you'll have to keep track of all the files it adds, either
    using timestamps or some compare software. It should be a bunch of
    files and/or folders in the '/plugins' directory, and possibly a
    few others in '/configuration', maybe '/features'. Take all the new
    folders and any jar files etc, and drop them into the same folders
    in your special Eclipse version. Hopefully when you start it up
    you'll get the Flex functions...
    Of course, you could end up hosing your entire "NWDS"
    (whatever this is) install. So you probably want to test it out
    first!

  • How to put an image in a data grid in Flex Builder 2

    Hi All,
    I need to populate a data grid with some text data received
    from a web service and, in a particular column of the datagrid, I
    have to put an image depending of a specific data returned me by
    the web service.
    It seems that there is the possibility to add an image in
    data grid column with the cellRenderer properties, but this
    property is available only for ActionScript 3.
    I'm developing an application in Flex Builder 2 that run
    ActionScript 2 and cellRenderer properties is not available. Is it
    right?
    If no, I will can use this cellRenderer properties in my
    application. Please, can you show me an example?
    If yes, there is a way to insert an image in datagridcolumn
    with ActionScript 2?
    Thank you very much
    Regards

    Flex Builder 2 uses Actionscript 3.
    You will need to write a renderer for for this column.
    There are a lot of examples of datagrids with images in them.
    here is one from the livedocs
    http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Live Docs_Book_Parts&file=cellrenderer_072_28.html

  • How To Populate An Advanced Data Grid In Flex With An XML Document Created In JAVA

    Flex Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="856" height="698" initialize="onInitData()">
        <mx:RemoteObject destination="utilityUCFlexRO" id="utilityUCFlexRO">
            <mx:method name="updateStationDetails" result="handleUpdateStationDetailsResult(event)" fault="handleUpdateStationDetailsFault(event)"/>
        </mx:RemoteObject>
        <mx:RemoteObject id="uniqueIdMasterUCFlexRO" destination="uniqueIdMasterUCFlexRO">
            <mx:method name="readByCustomerName" result="handleReadByCustomerNameResult(event)" fault="handleReadByCustomerNameFault(event)"/>
            <mx:method name="getCustomerAcDetails" result="handlegetCustomerAcDetailsResult(event)" fault="handlegetCustomerAcDetailsFault(event)"/>
        </mx:RemoteObject>
        <mx:Script>
            <![CDATA[
                import mx.events.ListEvent;
                import mx.collections.ItemResponder;
                import com.citizen.cbs.model.UniqueIdMaster;
                import mx.managers.PopUpManager;
                import mx.controls.ProgressBarMode;
                import mx.effects.Fade;
                import mx.controls.ProgressBar;
                import com.citizen.cbs.CitizenApplication;
                import mx.core.Application;
                import mx.messaging.messages.ErrorMessage;
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                import mx.collections.ArrayCollection;
                import mx.controls.Alert;
                private var moduleCloseFlag:Boolean=false;
                private var v:UniqueIdMaster;
                [Bindable]
                private var customerDetails:ArrayCollection;
                [Bindable]
                private var branch:int=0;
                [Bindable]
                private var XMLDocument:XML;
                [Bindable]
                private var acDetails:XMLList;
                private var _progBar:ProgressBar = new ProgressBar();
                private function showLoading(e:Event = null):void
                    _progBar.width = 200;
                    _progBar.indeterminate = true;
                    _progBar.labelPlacement = 'center';
                    _progBar.setStyle("removedEffect", Fade);
                    _progBar.setStyle("addedEffect", Fade);
                    _progBar.setStyle("color", 0xFFFFFF);
                    _progBar.setStyle("borderColor", 0x000000);
                    _progBar.setStyle("barColor", 0x6699cc);
                    _progBar.label = "Please wait.......";
                    _progBar.mode = ProgressBarMode.MANUAL;
                    PopUpManager.addPopUp(_progBar,this,true);
                    PopUpManager.centerPopUp(_progBar);
                    _progBar.setProgress(0, 0);
                private function onInitData():void
                    utilityUCFlexRO.updateStationDetails(CitizenApplication.menuParameters["modulecode"]);
                private function handleUpdateStationDetailsResult(event:ResultEvent):void
                    if(moduleCloseFlag==true)
                        Application.application.unloadModule();
                private function handleUpdateStationDetailsFault(event:FaultEvent):void
                    var errorMessage:ErrorMessage = event.message as ErrorMessage;
                    Alert.show(errorMessage.rootCause.message);
                private function onSearch():void
                    if(txtName.text=="" || txtName.text==null)
                        Alert.show("Enter a name for search");
                        return;
                    if((txtName.text).length < 4)
                        Alert.show("Search should contain more than 3 alphabets");
                        return;
                    var d:String = txtName.text;
                    branch = CitizenApplication.initInfo.registeredUser.branchDetails.bdBranchNo;
                    uniqueIdMasterUCFlexRO.readByCustomerName(d,branch);
                    showLoading();
                private function handleReadByCustomerNameResult(event:ResultEvent):void                //In handle if record does not exists, dsiplays error message and resets the field
                    customerDetails =ArrayCollection(event.result);
                    PopUpManager.removePopUp(_progBar);
                    if(customerDetails.length==0)
                        Alert.show("Record Not Found, Enter Proper Name ");
                        onReset();
                private function handleReadByCustomerNameFault(event:FaultEvent):void
                    Alert.show(event.fault.faultDetail + " -- " + event.fault.faultString + "handleReadByCustomerNameFault");
                private function onReset():void
                    customerDetails=new ArrayCollection();
                    txtName.text="";
                private function onCancel():void
                    utilityUCFlexRO.updateStationDetails("MM0001");
                    moduleCloseFlag=true;
                private function btnBackClick():void
                    view1.selectedIndex=0;
                private function btnBackClick1():void
                    view1.selectedIndex=1;
                private function onItemClick( e:ListEvent ):void
                    if(dgCustDetails.selectedItem == null)
                        Alert.show("Select Proper Record");
                    else
                        lblId.text = e.itemRenderer.data.uimCustomerId;
                        lblName.text = e.itemRenderer.data.uimCustomerName;
                        var custId:int = Number(lblId.text);   
                        uniqueIdMasterUCFlexRO.getCustomerAcDetails(custId,branch);
                        showLoading();           
                private function handlegetCustomerAcDetailsResult(event:ResultEvent):void               
                    //XMLDocument = event.result as XML;
                    acDetails = new XMLList(event.result.menu);
                    //Alert.show("Name: "+event.result.@name);
                    PopUpManager.removePopUp(_progBar);
                    view1.selectedIndex=1;
                    //adg1.dataProvider=acDetails;
                private function handlegetCustomerAcDetailsFault(event:FaultEvent):void
                    PopUpManager.removePopUp(_progBar);
                    Alert.show(event.fault.faultDetail + " -- " + event.fault.faultString + "handlegetCustomerAcDetailsFault");
            ]]>
        </mx:Script>
        <mx:ViewStack height="688" width="856" id="view1">
            <mx:Canvas>
                <mx:Panel x="51" y="25" width="754" height="550" layout="absolute" title="Customer Search Page">
                    <mx:HBox x="174" y="26" horizontalAlign="center" verticalAlign="middle">
                        <mx:Label text="Enter Name:"/>
                        <mx:TextInput id="txtName" width="228"/>
                        <mx:LinkButton label="Search" click="onSearch()"/>
                    </mx:HBox>
                    <mx:Label text="--" id="lblId" x="40" y="194"/>
                    <mx:Label text="--" id="lblName" x="40" y="226"/>
                    <mx:DataGrid dataProvider="{customerDetails}" id="dgCustDetails" allowMultipleSelection="false" editable="false"
                        showHeaders="true" draggableColumns="false" width="718" height="373" itemClick="onItemClick(event);" x="10" y="61">
                        <mx:columns>
                            <mx:DataGridColumn headerText="Customer Id" dataField="uimCustomerId" width="150"/>
                            <mx:DataGridColumn headerText="Customer Name" dataField="uimCustomerName"/>
                        </mx:columns>
                    </mx:DataGrid>
                    <mx:ControlBar>
                        <mx:Button label="CANCEL" click="onCancel()" width="80"/>
                        <mx:Button label="RESET" click="onReset()" width="80"/>
                    </mx:ControlBar>
                </mx:Panel>
            </mx:Canvas>
            <mx:Canvas>
                <mx:TitleWindow x="10" y="10" width="836" height="421" layout="absolute">
                    <mx:AdvancedDataGrid x="6.5" y="10" id="adg1" designViewDataType="tree" variableRowHeight="true" width="807" height="278" fontSize="14">
                        <mx:dataProvider>
                              <mx:HierarchicalData source="{acDetails}"/>
                        </mx:dataProvider>
                        <mx:groupedColumns>
                            <mx:AdvancedDataGridColumn headerText="Type Of A/c" dataField="@Name" width="150"/>
                            <mx:AdvancedDataGridColumn headerText="Details Of A/c"/>
                        </mx:groupedColumns>
                        <mx:rendererProviders>
                            <mx:AdvancedDataGridRendererProvider id="adgpr1" depth="2" columnIndex="1" renderer="AcDetails1" columnSpan="0"/>
                        </mx:rendererProviders>
                    </mx:AdvancedDataGrid>
                    <mx:ControlBar height="56" y="335">
                        <mx:Button label="BACK" width="80" click="btnBackClick()"/>
                        <mx:Spacer width="100%"/>
                        <mx:Button label="EXIT" click="onCancel()" width="80"/>
                    </mx:ControlBar>
                </mx:TitleWindow>
            </mx:Canvas>
        </mx:ViewStack>
    </mx:Module>
    XML File Generated In JAVA:
    <?xml version="1.0" encoding="UTF-8"?>
    <menu>
    <AcType Name="Savings">
    <SavingAcDetails AcName="Mr. MELROY BENT" AccountNo="4" ClearBalance="744.18" ProductID="SB" TotalBalance="744.18">
    <SavingMoreAcDetails AcStatus="OPERATIVE" AcType="NORMAL" FreezeCode="No Freeze" ModeOfOper="AnyOne Single Or Survivor"/>
    </SavingAcDetails>
    </AcType>
    <AcType Name="TermDeposit">
    <TDAcDetails AcName="Mr. BENT MELROY" AccountNo="1731" ProductID="TD">
    <TDMoreAcDetails AcStatus="OPERATIVE" AcType="NORMAL" FreezeCode="No Freeze" ModeOfOper="Either or Survivor"/>
    </TDAcDetails>
    <TDAcDetails AcName="Mr. BENT MELROY" AccountNo="2287" ProductID="TD">
    <TDMoreAcDetails AcStatus="NEW" AcType="NORMAL" FreezeCode="No Freeze" ModeOfOper="Self"/>
    </TDAcDetails>
    <TDAcDetails AcName="Mr. BENT MELROY" AccountNo="78" ProductID="TD">
    <TDMoreAcDetails AcStatus="OPERATIVE" AcType="NORMAL" FreezeCode="No Freeze" ModeOfOper="Self"/>
    </TDAcDetails>
    </AcType>
    </menu>
    Tried Alot Of Examples Online But In Vain....
    Need Help....
    Thanks In Advance....

    Please help me !!!! I have been stuck up with this issue for the past two days and I need to atleast figure out if this is possible or not in the first place.

  • Populating a Forum froma  data grid in Flex

    I have a forum that I would like to pouplate to be able to edit the information in Flex (flash builder four). So how would I click on a row of data (from a datagrid) and have it populate the forum?

    Hi,
    Do you mean a Form? Try listening for the "gridClick" event on the DataGrid and looking at the "item" property of the event. This event dispatches when the user clicks on the DataGrid and item will be the data object from the row that the user clicks on. I've written up a simple example below:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
        <s:layout>
            <s:VerticalLayout gap="10" paddingTop="10" paddingRight="10" />
        </s:layout>
        <fx:Script>
            <![CDATA[
                import spark.events.GridEvent;
                protected function dataGrid_gridClickHandler(event:GridEvent):void
                    var item:Object = event.item;
                    if (item)
                        keyTI.text = item.key;
                        nameTI.text = item.name;
            ]]>
        </fx:Script>
        <s:DataGrid id="dataGrid" gridClick="dataGrid_gridClickHandler(event)">
            <s:ArrayCollection>
                <fx:Object key="1000" name="Abrasive" />
                <fx:Object key="1001" name="Brush"/>
                <fx:Object key="1002" name="Clamp"/>
                <fx:Object key="1003" name="Drill"/>
                <fx:Object key="1004" name="Epoxy"/>
                <fx:Object key="1005" name="File" />
                <fx:Object key="1006" name="Gouge"/>
                <fx:Object key="1007" name="Hook"/>
                <fx:Object key="1008" name="Ink" />
                <fx:Object key="1009" name="Jack" />            
            </s:ArrayCollection>
        </s:DataGrid>
        <s:Form>
            <s:FormItem label="key">
                <s:TextInput id="keyTI" />
            </s:FormItem>
            <s:FormItem label="name">
                <s:TextInput id="nameTI" />
            </s:FormItem>
        </s:Form>
    </s:Application>
    Of course, you'll have to write some code so that the you can edit the data and save it from the Form. Hope this helps.
    -Kevin

  • Customer exit variable for date range for the last day

    Hi,
    If user enters date ranges in variable
    suppose user enters 9/1/2010 to 9/15/2010 and we have to calculate currency conversion based on last day i..e 9/15/2010 . 08
    2)User input is date range 08/01/2010 to 08/30/2010
    I need from the customer exit 08/30/2010 (on last day) to calculate currency conversion.
    Can anyone help me with ABAP code to achieve this customer exit?And please tell me how to proceed step by step
    Sridhar

    create a variable to enter date range (ZDATE1)
    create a key date variable(ZDATE2) with processing type customer exit, should not be ready for input.
    In the exit ZXRSRU01 write below code.
    DATA: l_s_range TYPE rsr_s_rangesid,
          loc_var_range LIKE rrrangeexit.
    WHEN 'ZDATE2'.
        IF i_step = 2.
           read table i_t_var_range INTO loc_var_range
                    with key vnam = 'ZDATE1'.
            CLEAR l_s_range.
            l_s_range-low = loc_var_range-high.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
        ENDIF.

  • Custom Pipeline component for Removing Trailer record from .txt file

    public Microsoft.BizTalk.Message.Interop.IBaseMessage
    Execute(Microsoft.BizTalk.Component.Interop.IPipelineContext pc,
    Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
        IBaseMessagePart bodyPart = inmsg.BodyPart;
        Stream originalStrm = bodyPart.GetOriginalDataStream();
        StreamReader sReader =
    new StreamReader(originalStrm,
    System.Text.Encoding.UTF8);
        string sRecord = sReader.ReadToEnd();
        MemoryStream memStream =
    new MemoryStream();
        StreamWriter sw =
    new StreamWriter(memStream);
        inmsg.BodyPart.Data
    = memStream;
        inmsg.BodyPart.Data.Position
    = 0;
        //"\r\n" is the delimeter for the the record
        string[] separator
    = new string[]
    { "\r\n" };
        string[] strArray
    = sRecord.Split(separator,
    StringSplitOptions.None);
        //Loop untill the last line (i.e ignore the trailer)
        for (int n
    = 1; n < strArray.Length; n++)
            sw.Write((strArray[n
    - 1] +
    "\r\n"));
        sw.Flush();
        memStream.Flush();
        memStream.Position
    = 0;
        inmsg.BodyPart.Data
    = memStream;
        inmsg.BodyPart.Data.Position
    = 0;
        return inmsg;
    after Deploying and in Gac, when configuring Receive Pipeline, it shows no properties in Decode stage ?
    MBH

    There is nothing wrong with your code it removes the lastline, if there is no carriage return on it.
    If your input file is like:  
       line1 <cr><lf>
               line2 <cr><lf>
               line3 
    The result is: 
               line1 <cr><lf>
               line2 <cr><lf>
    But if your input file is like:
                 line1 <cr><lf>
                  line2 <cr><lf>
                  line3 <cr><if>
    The result is:
                 line1<cr><lf>
                 line2<cr><lf>
                <empty line>
    So when you have a carriage return on the last line, it results in an empty line, can this be the cause of your problem?

  • Graphical component for date??

    is there any graphical component enable user to select a date (day,mounth,year)?
    thanks in advance

    http://java.sun.com/j2se/1.4.1/docs/api/javax/swing/JFormattedTextField.html

  • Custom error message for invalid date format

    Hi,
    I am using af:selectInputDate component for date. When i enter wrong date format it comes up follwoing pop up error message:
    The value "12/13/2009" is not a valid date. Valid example ""29/11/2005".
    However i dont want to show this standard message but a customised error message like "the value is not in correct format...".
    Can anyone help me how can i show customised message.

    Hi Kiran
    Try these options
    1) Change your <b>Internet Explorer</b> [The Browser which you are using] language
    2) In Application Level, ie in Webdynpro
    a)Go to <b><Your project name>>Webdynpro>Applications--><Your Application>
    Double click on your Application name</b>b) Go to Application Properties TAB, Add a New Application Property
    c) Click on "<b>Browse</b>" and Select <b>DefaultLocale</b> and mention the Value as
    <b>en_US</b> [If you didnt mention any thing here by default it will take browser's language]
    3)In your Portal check the language setting of particular user in identity management
    Warm Regards
    Chaitanya.A

  • Display image into Data Grid

    Hello,
    I have to display into a data grid, in Flex 2, 2 columns:
    first column ( "Images") must contain a picture with an object and
    second column (" quantity") must contain the amount of that object
    that I want to buy. The problem is that I must take the name of the
    image from an .xml file, specified like this:
    <mx:DataGrid id="obj" dataProvider="{ObjList}" > where
    ObjList is the .xml file with <name/>
    <picture_address/> etc.
    The second column must contain a textbox so I can input a
    number of items for each picture ( can be also a combobox where
    from I can select some value, from 1 to 20 for example).
    I've searched the Internet and I haven't found a solution
    yet. Please give me a link or a solution for this problem.
    Tudor

    use itemrenderes.... the example below shows how to add an
    image.... you can do the same thing with a text box or combo box
    <mx:DataGridColumn width="10" headerText="Image">
    <mx:itemRenderer>
    <mx:Component>
    <mx:Canvas width="100%" height="100%">
    <mx:Image verticalCenter="0" horizontalCenter="0"
    source="{data.picture_adress}""/>
    </mx:Canvas>
    </mx:Component>
    </mx:itemRenderer>

  • Data grid issue

    Hi,
    i'm working on HFM 11.1.1.3 ,i loaded several flat files for data grid but i'm not able to see them in documents section,i loaded one custom document also, i tried several times but still its showing empty what can i do?
    please help me out
    Thanks

    Hi,
    columns is an array. After the dataprovider is set, save the columns to a temporary array
    private var tempColumns:Array;
    tempColumns = datagrid.columns;
    When the reset button is clicked, reset the columns from the tempArray.
    datagrid.columns = tempColumns;

  • Custom Pipeline Component in BTDF

    I have created a separate c# based custom pipeline component, how should I embed this in BTDF ?
    Want to make sure this is Gac'd and available when I deploy to all other environments ?
    MBH

    I created a c# code Custom Pipeline component for parsing against my flat file schema.
    <PropertyGroup>
     <IncludePipelineComponents>true</IncludePipelineComponents>
     </PropertyGroup>
    <ItemGroup>
     <PipelineComponents Include="$(ProjectName).PipelineComponents.dll">
       <LocationPath>..\PipelineComponents\bin\$(Configuration)</LocationPath>
     </PipelineComponents>
    </ItemGroup>
    But it doesn't appear when I deploy into other environments ? what am I  missing  ?
    MBH

  • My custom Tool tip on spark data Grid don't work ?

    I want to add panel component as my tooltip for each row in my Spark DataGrid. So when mouse rollover the user can see the information for each the ship. I want a panel as my tooltip for dataGrid cause I want to organize my data neatly and also place a image in the panel.
    I came across :http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf60d65-7ff6.html  where they show an example of "Implementing the IToolTip interface" using the panel.I tried manipulating the codes but it didt work for my spark dataGrid.
    So my question :
    Can some one pls show me how I can use the Panel as my tool tip for each row in spark data grid.
    I have been struggling for quite some time.If possible pls Give me an example.
    This is my codes below (I tried to follow the example from :http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf60d65-7ff6.html#WS2d b454920e96a9e51e63e3d11c0bf60d65-7ff4 -"Implementing the IToolTip interface")
    My MXML Application codes :
        <fx:Script>
        <![CDATA[
            import DesignItemRenderer.PanelToolTip;
            import mx.events.ToolTipEvent;
            import mx.collections.ArrayCollection;         
            import mx.controls.Alert;  
            import spark.events.GridEvent; 
            [Bindable]
            private var myArrivalShips:ArrayCollection = new ArrayCollection([
                {arrivalShipsName:"Ship A", ETD:"12 March"},
                {arrivalShipsName:"Ship B", ETD:"25 March"}            
            private function createCustomTip(event:ToolTipEvent):void {
                var ptt:PanelToolTip = new PanelToolTip();
                ptt.title = "my Ship Info";
                ptt.bodyText = "my data for the ship";
                event.toolTip = ptt;
        ]]>
    </fx:Script>
    <s:BorderContainer x="267" y="11" width="331" height="586">
        <s:DataGrid id="arrivalTable" x="10" y="326" width="302" height="205" requestedRowCount="4" dataProvider="{myArrivalShips}" toolTipCreate="createCustomTip(event)">
            <s:columns>
                <s:ArrayList>
                    <s:GridColumn dataField="arrivalShipsName" headerText="Arrival Ships" ></s:GridColumn>
                    <s:GridColumn dataField="ETD" headerText="ETD"></s:GridColumn>             
                </s:ArrayList>
            </s:columns>           
        </s:DataGrid>
        <s:BorderContainer x="10" y="19" width="302" height="285">
        </s:BorderContainer>
    </s:BorderContainer>
    My Custom Panel codes :
    <s:Panel xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300"
         implements="mx.core.IToolTip" >
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
        <![CDATA[
            [Bindable]
            public var bodyText:String = "";
            //  Implement required methods of the IToolTip interface; these
            //  methods are not used in this example, though.
            public var _text:String;
            public function get text():String {
                return _text;
            public function set text(value:String):void {
        ]]>
    </fx:Script>
    <s:RichText text="{bodyText}" percentWidth="100"/>
    </s:Panel>

    Ok I was getting ready to post the renderer code and then found the problem. I had copied this code from another renderer which had contentBackgroundAlpha=0 in the MXAdvancedDataGridItemRenderer tag. When I removed it, the style of the TextArea worked as intended. Your comment helped me to take a closer look at the renderer code, so thank you.

  • Flex datagrid custom itemEditor - not returning data

    Hi,
    I am new to flex and this is a basic "How to" question.
    I want to  write custom item editors and renderers for a datagrid column.
    I am facing two problems here
    1) override public function get data() : Object is not working. however, if the type of the column is just text then override public function get text():String is working. Specifying editorDataField in the datagrid column definition is working for some types ex:Strings, Numbers
    2) Nothing is working for slightly more complex types like an Image. even editorDataField is not working. Somewhere between the user editing the data (in the case of an image, edit = browse, select & load an image) and grid asking for data at itemEditEnd, the entire data loaded by the user is disappearing and it is returning null or some default value I'd set it to in override public function set data().
    I am aware that datagrid reuses both editors and renderers but I dono how the data user has set is getting lost while the focus is on the same cell
    I have tried to use getter setter for this custom data field mentioned in editorDataField but when I do so, nothing works.. it fails even for string type
    It should be a simple thing to do and I am sure I am making some silly mistake .. please help me out. It has driven me nuts since today morning..
    any pointers would be really appreciated.

    Hi,
    thanks for the info. This is the understanding that I had after reading livedocs about item renderers.
    I have given the correct editorDataField and dataField. But it isnt working..I am not sure what you mean by For complex renderers, make sure the property is properly implemented on the outer component.
    The weird part is specifying editorDataField works for String and not for an image.  I am pasting some of code (highlighting relevant parts) below.. please have a look and tell me what I am missing.
    Datagrid :
    <mx:DataGrid id="dg" editable="true" rowHeight="100" width="861" x="10" y="10" height="498"
                     dataProvider="{this.slideArray}">
            <mx:columns>
                <mx:DataGridColumn headerText="Text" width="100"
                                   resizable="true" sortable="false"
                                   itemRenderer = "mx.controls.Label"
                                   itemEditor="editors.TextEditor"
                                   dataField="text" editorDataField="myData"/>
                <mx:DataGridColumn headerText="Image" width="600" resizable="true" sortable="false"
                                   itemRenderer="mx.controls.Image"
                                   itemEditor="editors.ImageEditor"
                                   dataField="image" editorDataField="myData"/>           
            </mx:columns>
        </mx:DataGrid>
    Text editor :
    <?xml version="1.0" encoding="utf-8"?>
    <s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                              xmlns:s="library://ns.adobe.com/flex/spark"
                              xmlns:mx="library://ns.adobe.com/flex/mx"
                              focusEnabled="true"
                              initialize="initEditor()">
        <mx:TextInput id="edit" width="{this.width}" height="{this.height}"/>
        <fx:Script>
            <![CDATA[
                import domain.Slide;  // has two properties : public  var text : String and public var image : mx.controls.Image;
                override public function set data(value:Object):void{
                    super.data = value;
                    this.edit.text = (value as Slide).text;
                public var myData : String; // editor data field
                import mx.binding.utils.BindingUtils;
                private function initEditor():void{
                    BindingUtils.bindProperty(this,"myData", this.edit, "text");
            ]]>
        </fx:Script>
    </s:MXDataGridItemRenderer>
    ImageEditor :
    <?xml version="1.0" encoding="utf-8"?>
    <s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                              xmlns:s="library://ns.adobe.com/flex/spark"
                              xmlns:mx="library://ns.adobe.com/flex/mx"
                              width="100%" height="100%"
                              focusEnabled="true" contentBackgroundColor="#F1B4B4">
        <mx:Image id="img" x="0" y="0" width="200" height="200" />
        <s:Button label="Click to Add Image" id="addImageButton" click="addImageButton_clickHandler(event)"
                  x="0" y="{this.height - addImageButton.height}"/>
        <fx:Script>
            <![CDATA[
                import domain.Slide;
                public var myData : Image; //editor data field
                override public function set data(value:Object):void{
                    super.data = value;
                    if( (value as Slide).image != null) this.img.source = (value as Slide).image.source;
                protected function addImageButton_clickHandler(event:MouseEvent):void
                    // select image from file system
                    var imgFilter : FileFilter = new FileFilter("Images","*.jpg;*.png;*.gif");
                    var fileRef : FileReference = new FileReference();
                    fileRef.addEventListener(Event.SELECT, fileSelectHandler);
                    fileRef.addEventListener(Event.OPEN, fileOpenHandler);
                    fileRef.addEventListener(Event.CANCEL, fileCancelHandler);
                    fileRef.browse([imgFilter]);
                    function fileRefSelectListenerUp(e:Event):void{}
                private function fileSelectHandler(event : Event):void{
                    var fileRef : FileReference = event.target as FileReference;
                    fileRef.addEventListener(Event.COMPLETE, fileLoadHandler);
                    fileRef.load();
                private function fileLoadHandler(event : Event) : void{
                    var fileRef : FileReference = event.target as FileReference;
                    this.myData = new Image;
                    this.myData.name = fileRef.name;
                    this.myData.source = fileRef.data;
                    this.img.source = fileRef.data;
                private function fileOpenHandler(event : Event):void{}           
                private function fileCancelHandler(event : Event):void{}
            ]]>
        </fx:Script>
    </s:MXDataGridItemRenderer>

Maybe you are looking for

  • Bapi_po_create1 is giving same system messages  multiple time in the joblog

    Hi Experts, Bapi_po_create1 is giving same system messages multiple times in the job log when we ran the program in the background can u plz suggest how to prevent these multiple appearances of same messages. I am pasting the code below whn i ran thi

  • Making a form in Adobe 8

    I'm new to Adobe Reader, using Adobe reader 8, on Windows Vista. I have written a workbook that will be emailed to Life Coaching clients. They will read the questions and fill out the form prior to a conference call session for a group class session.

  • Processing History for Services for Object

    Hello Together, I created documents attachment in CJ20N Transaction code using the button "services for the object ," for one WBS Element. Some one have deleted some documents from the list, I did not see who deleted this, it there a processing histo

  • CProject user cannot edit (confirm) their assigned tasks

    Dear Experts, we are facing an unexpected behaviour on cProjects: project user cannot edit (confirm) their assigned tasks, because the authorizations at the task level for user appear as Read (authorizations view on task), while on the project defini

  • Best servlet tutorial

    Hi every one could any one have a good java servlet tutorial or documentation to recommend to me ? If so, please just send me references or its hyperlink. Thanks