Datagrid itemrenderer causing weird data scrolling behaviour

I have a datagrid bound to an array for editing and viewing.
I have a listener for an ItemEditEnd event which looks at the
input, chomps any whitespace and writes back to the itemrenderer
the updated string. But... if I then reload the data into the
dataprovider the datagrid doesn't render it properly because it
retains a memory of the previously edited value and re-displays it
on the line below where it was. So repeatedly reloading the data
causes edited values to magically scroll themselves downwards in
the datagrid!
I gues this is something to do with itemrenderers being
recycled, but I have no idea how to code around it. Any help would
be gratefully received. A simplified mock up of the problem is
attached.
Many thanks in advance,
Steve

Nothing new in that article, maybe as the series
progresses...
I have a found a hack around this but it's not the way I want
to do it. If I add the itemeditend event listener with a very low
priority (-100) so it gets executed after flex has already updated
the datagrid I can interact directly with the data, instead of the
itemeditor/renderer before the data is updated. This means I can't
do a preventUpdate() and force the user to correct the input so is
not ideal, but it works in this limited application.
I did find this:
http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_8.html
which has exactly the same case of needing to modify data sent back
from an itemeditor. It pokes the modified data back to
TextInput(myGrid.itemEditorInstance).text which is the same object
as my (event.itemRenderer as TextInput).text. Doesn't work.
I attach my code for anyone else struggling with this. If
anyone has a better solution I'd love to see it.
Steve

Similar Messages

  • Datagrid itemrenderer fails - data interchanged between cells

    Hi,
    I have the follwing datagrid, the 2nd column of which calls an itemrenderer...
    <mx:DataGrid x="10" y="10" width="478" height="209" headerHeight="0" id="dgFollowUp"  verticalAlign="top" variableRowHeight="true" wordWrap="true" borderStyle="none" borderThickness="0" color="#000000" useRollOver="false" selectionColor="#FFFFFF">
            <mx:columns>
                <mx:DataGridColumn dataField="sel"  width="30"  textAlign="left"  sortable="false"   id="colsel" headerText="" >
                    <mx:itemRenderer>
                        <mx:Component>
                            <mx:CheckBox paddingTop="2"  paddingLeft="10" selected="{data.sel}"
                                change="{data.sel = this.selected;}" click="parentDocument.changeIsSelectedStatus(this.selected, data)"/>
                        </mx:Component>
                    </mx:itemRenderer>
                </mx:DataGridColumn>
                <mx:DataGridColumn headerText="" dataField="{data.FDOCNO_CONCAT}" itemRenderer="dgFollowupTextRenderer"/>
            </mx:columns>
        </mx:DataGrid>
    ...And here it is:
    <?xml version="1.0"?>
    <!-- itemRenderers\list\myComponents\RendererState.mxml -->
        <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" height="100%">   
            <mx:Script>
                <![CDATA[
                    import mx.states.SetProperty;
                    import mx.controls.Text;
                    import mx.controls.Label;
                    import mx.managers.PopUpManager;
                  private function init():void
                      var myLabel:Text = new Text;
                      var myText:String = data.FDOCNO_CONCAT;
                      var myLink:Label;
                      var myVboxIn:VBox;
                      myLabel.text = myText;                  
                      myLabel.width = 430;      
                      myVbox.addChild(myLabel);                
                      if (myText.length > 400)
                          myLink = new Label;
                          myLink.text = this.parentApplication.scn2LangXml.lastResult.followup.lblReadMore;
                          myLink.setStyle('color', 0x0000FF);
                          myLink.mouseChildren = false;
                          myLink.buttonMode = true;
                          myLink.useHandCursor = true;
                          myLink.addEventListener(MouseEvent.CLICK, callPopup);
                          myVbox.addChild(myLink);
                  public function callPopup(event:Event):void
                    var FollowUpDetailsPop:FollowUpDetails;            
                    var count:Number = data.counter;
                    var tmp:String = data.FDOCNO +' :\n'+data.DESCRIPTION + '\n' + data.COMMENTS;
                    FollowUpDetailsPop = FollowUpDetails(PopUpManager.createPopUp(this, FollowUpDetails, true));
                    PopUpManager.centerPopUp(FollowUpDetailsPop);        
                    FollowUpDetailsPop.text = tmp;       
                ]]>
            </mx:Script>
            <mx:VBox id="myVbox" height="100%"/>
        </mx:VBox>
    ...And here is the popup:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="absolute"
        width="400"
        height="300"
        showCloseButton="true"
        close="close()"
        title="{this.parentApplication.scn2LangXml.lastResult.followupdate.lblTitleDetails}"
        borderAlpha="1">
    <mx:Script>
        <![CDATA[
            import mx.managers.PopUpManager;
            [Bindable] var text:String;
            private function close():void
                 PopUpManager.removePopUp(this);
        ]]>
    </mx:Script>
        <mx:TextArea id="txtDetails" text="{text}" x="10" y="10" width="360" height="240" editable="false"/>
    </mx:TitleWindow>
    ...........Everything displays correctly and the popup functions well too.. The only problem is that when you scroll the initial datatagrid, you see data in the column, which calls the itemrenderer, being swapped between the rows. I have tried same on another example and 1) on sorting the column, the popup contains the wrong data and 2) if there are other columns, its only the one calling for itemrenderer which swaps data between its rows.
    Any help | Many thanks..

    Hi,
    I have the follwing datagrid, the 2nd column of which calls an itemrenderer...
    <mx:DataGrid x="10" y="10" width="478" height="209" headerHeight="0" id="dgFollowUp"  verticalAlign="top" variableRowHeight="true" wordWrap="true" borderStyle="none" borderThickness="0" color="#000000" useRollOver="false" selectionColor="#FFFFFF">
            <mx:columns>
                <mx:DataGridColumn dataField="sel"  width="30"  textAlign="left"  sortable="false"   id="colsel" headerText="" >
                    <mx:itemRenderer>
                        <mx:Component>
                            <mx:CheckBox paddingTop="2"  paddingLeft="10" selected="{data.sel}"
                                change="{data.sel = this.selected;}" click="parentDocument.changeIsSelectedStatus(this.selected, data)"/>
                        </mx:Component>
                    </mx:itemRenderer>
                </mx:DataGridColumn>
                <mx:DataGridColumn headerText="" dataField="{data.FDOCNO_CONCAT}" itemRenderer="dgFollowupTextRenderer"/>
            </mx:columns>
        </mx:DataGrid>
    ...And here it is:
    <?xml version="1.0"?>
    <!-- itemRenderers\list\myComponents\RendererState.mxml -->
        <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" height="100%">   
            <mx:Script>
                <![CDATA[
                    import mx.states.SetProperty;
                    import mx.controls.Text;
                    import mx.controls.Label;
                    import mx.managers.PopUpManager;
                  private function init():void
                      var myLabel:Text = new Text;
                      var myText:String = data.FDOCNO_CONCAT;
                      var myLink:Label;
                      var myVboxIn:VBox;
                      myLabel.text = myText;                  
                      myLabel.width = 430;      
                      myVbox.addChild(myLabel);                
                      if (myText.length > 400)
                          myLink = new Label;
                          myLink.text = this.parentApplication.scn2LangXml.lastResult.followup.lblReadMore;
                          myLink.setStyle('color', 0x0000FF);
                          myLink.mouseChildren = false;
                          myLink.buttonMode = true;
                          myLink.useHandCursor = true;
                          myLink.addEventListener(MouseEvent.CLICK, callPopup);
                          myVbox.addChild(myLink);
                  public function callPopup(event:Event):void
                    var FollowUpDetailsPop:FollowUpDetails;            
                    var count:Number = data.counter;
                    var tmp:String = data.FDOCNO +' :\n'+data.DESCRIPTION + '\n' + data.COMMENTS;
                    FollowUpDetailsPop = FollowUpDetails(PopUpManager.createPopUp(this, FollowUpDetails, true));
                    PopUpManager.centerPopUp(FollowUpDetailsPop);        
                    FollowUpDetailsPop.text = tmp;       
                ]]>
            </mx:Script>
            <mx:VBox id="myVbox" height="100%"/>
        </mx:VBox>
    ...And here is the popup:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="absolute"
        width="400"
        height="300"
        showCloseButton="true"
        close="close()"
        title="{this.parentApplication.scn2LangXml.lastResult.followupdate.lblTitleDetails}"
        borderAlpha="1">
    <mx:Script>
        <![CDATA[
            import mx.managers.PopUpManager;
            [Bindable] var text:String;
            private function close():void
                 PopUpManager.removePopUp(this);
        ]]>
    </mx:Script>
        <mx:TextArea id="txtDetails" text="{text}" x="10" y="10" width="360" height="240" editable="false"/>
    </mx:TitleWindow>
    ...........Everything displays correctly and the popup functions well too.. The only problem is that when you scroll the initial datatagrid, you see data in the column, which calls the itemrenderer, being swapped between the rows. I have tried same on another example and 1) on sorting the column, the popup contains the wrong data and 2) if there are other columns, its only the one calling for itemrenderer which swaps data between its rows.
    Any help | Many thanks..

  • Enable disable linkbar links in datagrid itemrenderer.

    Hi All,
    I have to show the linkbar in datagrid column as a renderer and enable and disable the links according to attached documents codes.
    here are my sample code
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init();">
    <mx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;
            [Bindable]
              public var arrColl:ArrayCollection = new ArrayCollection();
              public function init():void{
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
        ]]>
    </mx:Script>
        <mx:DataGrid id="dg" dataProvider="{arrColl}" width="200" height="500" x="510" y="168" >
            <mx:columns>
                <mx:DataGridColumn  itemRenderer="assets.components.linkbarItemRenderer"  />   
            </mx:columns>
        </mx:DataGrid>
    </mx:Application>
    My item renderer linkbarItemRenderer.mxml as
    <?xml version="1.0" encoding="utf-8"?>
    <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" creationComplete="init();" >
    <mx:Script>
        <![CDATA[
            import mx.controls.LinkButton;
            import mx.collections.ArrayCollection;
            import mx.controls.Alert;
            [Bindable] public var arrColl : ArrayCollection = new ArrayCollection();
            public var arrDocType : ArrayCollection = new ArrayCollection([{data:"1" , label:"AP"},{data:"2" , label:"AR"},{data:"3" , label:"BOL"}]);
            public var attDoccodes : Array;
            public function init():void
                try
                    var requiredDoc :String = data[0];
                    var attachDoc : String = data[1];
                    var reqDocCodes :Array =  requiredDoc.split(",");
                    attDoccodes = attachDoc.split(",");
                    if(reqDocCodes != null)
                        //add the links of required documents.
                        for(var i:int = 0 ; i<reqDocCodes.length; i++ )
                            var obj:Object = new Object();
                            for(var j : int = 0; j < arrDocType.length; j++)
                                if(arrDocType.getItemAt(j).data == reqDocCodes[i])
                                    obj.label = arrDocType.getItemAt(j).label;
                                    obj.data  = reqDocCodes[i];
                            arrColl.addItem(obj);
                    callLater(enableDisalbeLinks);
                catch(error:Error)
                    Alert.show("error ::"+error.getStackTrace());
            public function enableDisalbeLinks():void
                try
                    //disable all links first
                    for(var q:int=0; q< arrColl.length; q++)
                        LinkButton(linkBarId.getChildAt(q)).enabled = false;   
                    if(attDoccodes != null)
                        for(var k:int = 0; k<attDoccodes.length; k++)
                            for(var l:int = 0 ; l<arrColl.length; l++)
                                if(arrColl.getItemAt(l).data == attDoccodes[k])
                                    LinkButton(linkBarId.getChildAt(l)).enabled = true;   
                catch(error:Error)
                    Alert.show("error ::"+error.getStackTrace());
        ]]>
    </mx:Script>
            <mx:LinkBar id="linkBarId" dataProvider="{arrColl}" />   
    </mx:HBox>
    It renderes the link in correct form in datagrid first time.when i scroll the datagrid the rows are miss up with each other and links are not shown propers in enable/disable format.
    Thanks,
    Amol.

    Hi All,
    It was my fault. Got it work now.
    When I redirect to PR, it also calls my page initialization method and clear all data. I added a parameter and issue resolved.
    Thanks & Regards,
    KJ

  • Data Scrolling Issue

    I have an application that shows a thumbnail image inside of a cell in a DataGrid.  Not every row must have a thumbnail but can.  If you have few enough items in the datagrid so that scrolling isn't necessary then you add 2 thumbnails at the top of the datagrid which forces the use of the scroll bar in the datagrid then if you try to scroll it jumps back to the top.  As far as I can tell what happens is when those first two rows are no longer visible in the datagrid the image is no longer rendered which allows the row height to go back to normal which in turn makes the rows visible again which in turn requires the use of the scroll bar. Video of the problem occuring can be seen below.  When the images are flashing and the mouse cursor is hovering over the datagrid I am usign the scroll wheel.
    You can find the project here: day2daydevelopment.com/code/ImageInDataGrid.fxp
    Any ideas on what is happening and how to fix it?

    Chris,
    Thanks for the reply!  That resolved the issue for me.  Basically I changed the thumbnail column to look like this
              <mx:DataGridColumn headerText="Thumbnail Image"
                                       dataField="thumbnailUrl"
                                       editorUsesEnterKey="false"
                                       editable="false">
                        <mx:itemRenderer>
                            <mx:Component>
                                <mx:Canvas width="100%"
                                           height="100%"                                                  
                                           horizontalScrollPolicy="off">
                                    <mx:Script>
                                        <![CDATA[
                                            override public function set data(value:Object):void {
                                                super.data = value;
                                                if (data.thumbnailUrl != "") {
                                                    this.explicitHeight = 200;
                                                else {
                                                    this.explicitHeight = 20;
                                        ]]>
                                    </mx:Script>
                                    <mx:Image id="viewImage" source="{data.thumbnailUrl}"/>
                                    <mx:LinkButton id="uploadImage"
                                                   icon="@Embed('/assets/tick.png')"
                                                   toolTip="Attach an image to this object."
                                                   click="{outerDocument.uploadImage()}"/>
                                </mx:Canvas>
                            </mx:Component>
                        </mx:itemRenderer>                               
                    </mx:DataGridColumn>
    The fixed project file can be downloaded from day2daydevelopment.com/code/ImageInDataGrid-Fixed.fxp

  • In Firefox 4 how can I cause the date on downloaded files to be the current date? (Some are and some are not. In FF3 the dates were ALWAYS the current ones.)

    In Firefox 4 how can I cause the date on downloaded files to be the current date? (Some are and some are not. In FF3 the dates were ALWAYS the current ones.)
    == This happened ==
    Every time Firefox opened
    == I upgraded to Firefox 4 (beta)

    Firefox 3.6.* and earlier set the downloaded file's modification time to the current time. In Firefox 4.0 the behavior has been changed, if a server returns a timestamp telling when the file was last modified (Last-Modified header), it is used instead.
    You can revert to the previous behaviour by using the [https://addons.mozilla.org/en-US/firefox/addon/93121/ Download Timestamp] add-on.

  • How populate itemrenderer items with data.

    How populate itemrenderer items with data. Ie after my app starts I generate an array collection that I want to assign as the data provider to each combobox in my item renderer, which im using in a datagrid.

    <?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">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
            <s:ArrayCollection id="booksWithStores">
                <fx:Object name="book1" stores="{new ArrayCollection(['store1','store2'])}"/>
                <fx:Object name="book2" stores="{new ArrayCollection(['store1','store3'])}"/>
                <fx:Object name="book3" stores="{new ArrayCollection(['store2','store3', 'store4'])}"/>
                <fx:Object name="book4" stores="{new ArrayCollection(['store1','store4'])}"/>
            </s:ArrayCollection>
            <s:ArrayCollection id="booksWithoutStores">
                <fx:Object name="bookA"/>
                <fx:Object name="bookB"/>
                <fx:Object name="bookC"/>
                <fx:Object name="bookD"/>
            </s:ArrayCollection>
            <s:ArrayCollection id="allStores">
                <fx:String>store1B</fx:String>
                <fx:String>store2B</fx:String>
                <fx:String>store3B</fx:String>
                <fx:String>store4B</fx:String>
            </s:ArrayCollection>
            <fx:Component id="renderer1" className="Renderer1">
                <s:MXDataGridItemRenderer>
                    <s:DropDownList dataProvider="{data.stores}" />   
                </s:MXDataGridItemRenderer>
            </fx:Component>
            <fx:Component id="renderer2" className="Renderer2">
                <s:MXDataGridItemRenderer>
                    <s:DropDownList dataProvider="{storesList}" />
                    <fx:Script>
                        <![CDATA[
                            import mx.collections.ArrayCollection;
                            [Bindable]
                            public var storesList:ArrayCollection;
                        ]]>
                    </fx:Script>
                </s:MXDataGridItemRenderer>
            </fx:Component>
        </fx:Declarations>
        <mx:Form>
            <mx:FormItem label="Dynamic Stores">
                <mx:DataGrid dataProvider="{booksWithStores}" width="354">
                    <mx:columns>
                        <mx:DataGridColumn dataField="name"/>
                        <mx:DataGridColumn dataField="stores" itemRenderer="{renderer1}"/>
                    </mx:columns>
                </mx:DataGrid>
            </mx:FormItem>
            <mx:FormItem label="Static Stores">
                <mx:DataGrid dataProvider="{booksWithoutStores}" width="354">
                    <mx:columns>
                        <mx:DataGridColumn dataField="name"/>
                        <mx:DataGridColumn dataField="stores" itemRenderer="{createRendererWithProperties(Renderer2, {storesList:allStores})}"/>
                    </mx:columns>
                </mx:DataGrid>
            </mx:FormItem>
        </mx:Form>
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                public static function createRendererWithProperties(renderer:Class, properties:Object):IFactory
                    var factory:ClassFactory=new ClassFactory(renderer);
                    factory.properties=properties;
                    return factory;
            ]]>
        </fx:Script>
    </s:Application>

  • Why does "last" give me weird dates?

    when I used the "last" command yesterday, I got a list of weird dates. An excerpt is below.
    First I thought these were in the future, but then looking at the weekdays I noticed that in fact they date back to 2009.
    Any ideas what could cause this?
    Thanks
    Last login: Thu Jul 23 23:43:25 on console
    preon:~ schnapp$ last
    schnapp  console                   Wed Aug 26 23:51   still logged in
    reboot    ~                         Wed Aug 26 23:50
    shutdown  ~                         Wed Aug 26 23:35
    schnapp  console                   Wed Aug 26 21:41 - 23:35  (01:54)
    reboot    ~                         Wed Aug 26 21:40
    schnapp  console                   Wed May 27 21:49 - 22:34  (00:45)
    reboot    ~                         Wed May 27 21:47
    shutdown  ~                         Wed May 27 01:46
    schnapp  console                   Tue May 26 22:53 - 01:46  (02:52)
    reboot    ~                         Tue May 26 21:35
    shutdown  ~                         Tue May 26 01:24
    wtmp begins Tue May 26 01:24

    I don't know - never used 'last' before but I get:
    $ last
    neville   ttys000                   Sun Jun 24 16:08   still logged in
    neville   console                   Sun Jun 24 11:27   still logged in
    reboot    ~                         Sun Jun 24 11:26
    shutdown  ~                         Sat Jun 23 23:25
    neville   ttys000                   Sat Jun 23 21:02 - 21:03  (00:00)
    neville   ttys000                   Sat Jun 23 14:44 - 15:34  (00:50)
    neville   console                   Sat Jun 23 11:39 - 23:25  (11:45)
    reboot    ~                         Sat Jun 23 11:39
    I am not sure if 'last' is affected by the failure to run maintenance tasks as intended but it can do no harm to correct the usual maintenance quirk as explained on my page at: http://links.zero.eu.org/os-x/period/
    Good luck.

  • DataProvider and itemEditEnd to the itemrenderer's set data()

    Hello,
    I'm hoping someone can give me some insight please.
    In a datagrid for which I have custom itemrenderers and an
    itemEditEnd event handler, I use the event handler to verify the
    value put into the cell and modify it. For example, if a user puts
    in a value that should be upper case, the value is modified to
    upper case and then the dataProvider's datasource (XMLList) is
    updated with the new value. Furthermore, the XML item that has the
    new value has an attribute added to it called "edited" with a
    value="true". The custom itemrenderer simply takes the data from
    the overridden set data() method and displays it in a particular
    color depending on the data.
    I am using the Flex builder debugger to step through every
    step of the way. When the ItemEditEnd event handler finishes
    processing, the debugger tells me that the datasource has been
    correctly updated with the modifications to the value (in this
    case, to upper case) and the attribute added. Then the debugger
    steps through to the custom itemrenderer's set data() method, which
    has an Object as an input parameter.
    I inspected that input parameter in the debugger and found
    that the entire row of the XML datasource is what that Object is.
    When I inspect that Object further, I find that the attribute added
    exists, but that the value that should have been modified is not -
    but is instead the original value put into the cell.
    1. What could possibly be going on here?
    2. Should modifications to the value entered be updated in
    the datasource when at the itemEditEnd event handler, or should
    they be done at the overriden set data() method of the
    itemrenderer?
    3. Would it be improper to get the instance of the custom
    renderer in the itemEditEnd event handler and stuff the modified
    value into it (in this case, the .text attribute of the subclassed
    TextInput)? What is wrong with this approach?
    Thanks for any insight you might have.

    "happybrowndog" <[email protected]> wrote in
    message
    news:[email protected]...
    >
    quote:
    Originally posted by:
    Newsgroup User
    >
    > "happybrowndog" <[email protected]>
    wrote in message
    > news:[email protected]...
    > > Thanks Amy,
    > >
    > > I tried itemUpdated() targetting the
    > > event.currentTarget.editedItemRenderer
    > > in the itemEditEnd event handler, and I also tried
    it targetting the
    > > datagrid
    > > itself. Both don't have the desired effect.
    Besides, the collection is
    > > already [Bindable], so is itemUpdated() even
    necessary?
    >
    > That doesn't make any sense. itemUpdated is a method of
    > ListCollectionView...it doesn't "target" any kind of
    visual object.
    >
    > > Curiously, in the example of "Example: Modifying
    data passed to or
    > > received
    > > from an item editor" at
    > >
    http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_8.html
    > > , it
    > > shows the itemRenderer being stuffed with a value
    in the itemEditEnd
    > > event
    > > handler. I thought that this was "against the
    framework" as trying to
    > > do
    > > similarly by setting the background color does not
    work right. What are
    > > your
    > > thoughts on this?
    >
    > No it doesn't. There isn't even an itemEditEnd handler
    _in_ that example.
    >
    >
    >
    >
    > It's in the itemEditBegin event handler. Does it make a
    difference
    > whether it
    > is in the itemEditBegin or the itemEditEnd handler when
    I was talking
    > about
    > accessing the itemrenderer from the "outside"? I mean,
    it is deemed
    > incorrect
    > to, for example, setStyle() to do so, so why would
    setting the value of
    > the
    > .text property be any different?
    Note that the itemEditBegin event handler actually CREATED
    the itemRenderer
    it is working with. If it _didn't_ set the data, the
    itemRenderer wouldn't
    know what to render. Also notice that the event is not trying
    to locate
    some unrelated itemRenderer. Instead, it is using the
    editedItemRenderer
    property of the dataGrid to locate the particular
    itemRenderer that the
    dataGrid has chosen to make available to the world at large
    (and for very
    good reason).
    The engineers aren't perfect, but they're a good deal more
    experienced than
    most of us. 99.7% of the time, if they have chosen to hide
    something, it is
    because it is better practice for it to be hidden, and if
    they have chosen
    to expose something, it is because they know that developers
    will need to
    access it.
    > When you say "doesn't make sense.... doesn't target any
    kind of visual
    > object"
    > because the itemUpdated is a method of ListCollection,
    then I don't
    > understand
    > the usage of that method. The language reference states:
    > """
    > public function itemUpdated(item:Object, property:Object
    = null,
    > oldValue:Object = null, newValue:Object = null):void
    > Notifies the view that an item has been updated.
    > """
    > The "view" referred to above seems to be a visual
    object. Is the "item"
    > parameter not the visual object? Please explain how to
    use this. I could
    > not
    > find any example online that makes it clear.
    yourXMLListCollection.itemUpdated(myDataGrid.editedItemRenderer.data);
    HTH;
    Amy

  • [b]Fill a DataGrid with the returned data of a Stored Procedure[/b]

    Hi
    I'm trying to use a stored procedure that returns data from the table tab_proc1 and a DataGrid that will display the results.
    Any help would be appreciated.
    bebop
    created the following in MS SQL Server:
    a table:
    create table tab_proc1 (col1 char(10), col2 char(10))
    a stored procedure:
    create procedure sp_test1
    as
    select * from tab_proc1
    Code I'm using:
    using System.Data;
    using System.Data.SqlClient;
    namespace spapc
         /// <summary>
         /// Summary description for WebForm1.
         /// </summary>
         public class WebForm1 : System.Web.UI.Page
              protected System.Web.UI.WebControls.DataGrid DataGrid1;
              protected System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
              protected System.Data.SqlClient.SqlCommand sqlSelectCommand1;
              protected System.Data.SqlClient.SqlCommand sqlInsertCommand1;
              protected System.Data.SqlClient.SqlConnection sqlConnection1;
              protected sptempdbTEST.DataSet1 dataSet11;
              protected System.Web.UI.WebControls.Button Button1;
              private void Page_Load(object sender, System.EventArgs e)
         //sqlDataAdapter1.Fill(dataSet11);
              //Page.DataBind();
    private void Button1_Click(object sender, System.EventArgs e)
    SqlConnection conn = new SqlConnection("server=localhost;database=apc;uid=ty;pwd=");
    try
         conn.Open();
         SqlCommand cmd = new SqlCommand("sp_test1", conn);
         cmd.CommandType = CommandType.StoredProcedure;
         //cmd.CommandText = "sp_test1";
         SqlDataAdapter myadapter =new SqlDataAdapter();
         myadapter.SelectCommand = cmd;
         myadapter.Fill(dataSet11);
         //DataGrid1.DataSource=dataSet11.Tables("tab_proc1");
         DataGrid1.DataSource = cmd.ExecuteReader();
         DataGrid1.DataBind();
    catch (SqlException ex)
         finally
         conn.Close();

    Why are you posting to an Oracle site when you are using MS SQL Server? This is a discussion forum for ODP.NET which stand for ORACLE Data Provider for .NET. Not MS SQL Data Provider for .NET!!

  • TS3579 I found this useful because I did not know about the effect of typing in data and that you could only drag to rearrange the data.  I had typed in data before and this had caused problems but restoring defaults did not cause correct dates to show up

    I found this  (TS3579: If the wrong date or time is displayed in some apps on your Mac Learn about If the wrong date or time is displayed in some apps on your Mac) useful because I did not know about the effect of typing in data and that you could only drag to rearrange the data.  I had typed in data before and this had caused problems but restoring defaults did not cause correct dates to show up in Finder. 

    It sounds like there are a couple things going on here.  First check if you have a successful install of SQL Server, then we'll figure out the connection issues.
    Can you launch SQL Server Configuration Manager and check for SQL Server (MSSQLSERVER) if default instance or SQL Server (other name) if you've configured your instance as a named instance.  Once you find this, make sure the service is started. 
    If not started, try to start it and see if it throws an error.  If you get an error, post the error message your hitting.  If the service starts, you can then launch SSMS and try to connect.  If you have a default instance, you can use the machine
    name in the connection dialog.  Ex:  "COWBOYS" where Cowboys is the machine name.  However, if you named the SQL Server instance during install, you'll need to connect using the machine\instance format.  Ex:  COWBOYS\Romo (where Romo
    is the instance name you set during install).
    You can also look at the summary.txt file in the SQL Server setup error logs to see what happened on the most recent install.  Past install history is archived in the log folder if you need to dig those up to help troubleshoot, but the most
    recent one may help get to the bottom of it if there is an issue with setup detecting a prior instance that needs to be repaired.
    Thanks,
    Sam Lester (MSFT)
    http://blogs.msdn.com/b/samlester
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and
    "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • Help: Data Scroller Component Tag doesnt work

    Help anybody!! I am working with the Data Scroller y the Data Table Components Tags. I run the page in Jdeveloper 9i, this is the code I wrote:
    <!--Begin-->
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>
    Hello World
    </TITLE>
    </HEAD>
    <BODY>
    <jbo:ApplicationModule id="PkimpexpModule" configname="pkimpexp.PkimpexpModule.PkimpexpModuleLocal" releasemode="Stateful" />
    <jbo:DataSource id="data_rep" rangesize="10" appid="PkimpexpModule" viewobject="ReporteDetView" />
    <jbo:DataTable datasource="data_rep" />
    <jbo:DataScroller datasource="data_rep" />
    </BODY>
    </HTML>
    <jbo:ReleasePageResources releasemode="Stateful" appid="PkimpexpModule" />
    <!--End-->
    The page run perfectly but when I want to move throw the pages it doesn't work, what am I doing wrong?
    I'll apreciate your help!!

    Hi Gina,
    do you have tried to change the order from
    <jbo:DataTable datasource="data_rep" />
    <jbo:DataScroller datasource="data_rep" />
    to
    <jbo:DataScroller datasource="data_rep" />
    <jbo:DataTable datasource="data_rep" />
    Marc

  • Weird Automatic Scrolling of Timeline

    I am running Premiere Elements 11 on Windows 7, 64 bit, with all the latest updates.
    I'm getting some weird automatic scrolling of the timeline happening.
    When I hover the mouse pointer anywhere on the left side of the screen, (including over the "File" menu bar portion) the timeline automatically starts scrolling left.
    When I hover the mouse pointer anywhere on the right side of the screen (like over the vertical scroll bar), the timeline automatically scrolls right.
    The only way to stop the scrolling is to move the mouse pointer away from the sides of the screen.
    This seems like an error -- but did I accidentally turn on some feature?
    Any suggestions how to get proper control back?
    Thanks,
    Nick

    Thanks for looking into this o promptly.  It's in the middle of the clip I'm marking.  It just happened again to me, and I'm paying a bit more attention to what happens when it occurs. 
    All is well as I'm working on a video track,  using the "go to next/previous keymark" arrows, which moves the CTI.  I want to fade to black so I right click and hold to drop the marker, but when I release the right mouse button, the diamond marker is "stuck" and moves left/right/up/down as I move the mouse.  (unexpected behavior)  I have to right click the mouse a couple of times to get it to release the key frame marker.
    Now when I move the mouse to the far left to select the "next keymark" arrow, the CTI stays put on the timeline and scrolls off the screen on the right as I move the mouse to the left, dragging the whole timeline back to the beginning.  The keyframe that I just dropped is somehow corrupt.  The CTI won't land there if I click next/previous and if I put the CTI on top of it and try to delete it, it stays on the screen.  Deleting the clip from the timeline and inserting it again (loosing my markers) returns me to a stable state.
    I'm guessing it's a mouse driver.  My PC is a Dell laptop and I'm using a USB connected mouse and keyboard, rather than the touchpad.

  • Discoverer 4i: GL Query caused no data to be received

    Hi,
    E-Business 11.5.10.2 on Windows Server 2003 SP2
    Discoverer 4i
    I've set up Discoverer 4i and am currently using Discoverer Desktop to query the business areas. I can retrieve data from any business area apart from GL.
    When I attempt to query GL I get an error message stating 'Query caused no data to be received'.
    Has anyone encountered this before? Any help greatly appreciated.
    Thanks,
    Mark

    Hi,
    It could be that these GL folders use row level security and the gl_security_pkg is not initialized.
    Try creating a custom folder containing:
    select gl_security_pkg.login_sob_id from dualLog in with the UK GL User responsibility and create a workbook based on this custom folder. If this returns a null row then the GL package is not properly initialized. Check that the "GL Set of Books ID" system profile is set for the responsibility. You can initilalize the package manually by adding the following text into the the "Initialization SQL Statement - Custom" system profile for the responsibility:
    begin
    gl_security_pkg.init;
    end;Hope that helps,
    Rod West

  • TabIndex in DataGrid ItemRenderer Component

    How to implement tabindex for the DataGrid ItemRenderer
    Component?Any
    idea Please.

    "ravi_bharathii" <[email protected]> wrote
    in message
    news:gbv9ps$k6r$[email protected]..
    > How to implement tabindex for the DataGrid ItemRenderer
    Component?Any
    > idea Please.
    Is this what you wanted?
    http://blogs.adobe.com/aharui/2008/08/datagrid_itemeditor_with_two_i.html

  • Weird data obtained when running Task: AD Group Lookup Recon

    Hi,
    Im running the scheduled task named: AD Group Lookup Recon
    It works. and populates the lookup named Lookup.ADReconciliation.GroupLookup
    but when lookin in the design console, the Code Key and the Decode values have weird data ie:
    code key: 2~CN=TelnetClients,CN=Users,DC=adtest,DC=com     
    Decode: ADITResource~CN=TelnetClients,CN=Users,DC=adtest,DC=com
    in the code key there is an extra *2~*
    in the Decode is an extra ADITResource~
    I may think that it is some kind of coding for connector commands used in provision tasks, when I'm trying to provision an OIM user to Active Directory (in the Organization Lookup field) i get this data
    this is just one line:
    Value: 2~CN={6AC1786C-016F-11D2-945F-00C04fB984F9},CN=Policies,CN=System,DC=adtest,DC=com      
    Description: ADITResource~CN={6AC1786C-016F-11D2-945F-00C04fB984F9},CN=Policies,CN=System,DC=adtest,DC=com
    Any Ideas?
    Thank You.

    yes you are right, code key and decode key is because of the coding in the connector to distinguish lookup values coming from multiple IT resources.
    If you want to get rid of this [IT Resource~] you will have to modify the connector.
    One more thing looks like the base dn you have specified for lookup reconciliation is DC=adtest,DC=com with generic filter thats why you are getting entries like 2~CN={6AC1786C-016F-11D2-945F-00C04fB984F9},CN=Policies,CN=System,DC=adtest,DC=com which may not be a group you want
    Hope this helps,
    Sagar

Maybe you are looking for