Buggy AdvancedDataGrid Events

I am using Flex 3.5
I worked on all the ADG Events, and found that these are getting called multiple time, i dont understand why.
The reason i guess is, on edit, the grid is getting refreshed twice ...leading to events fire twice....
Any help how can i stop them from getting called twice ??

Update: I've inspected the <dataGrid>.<dataProvider>.<source> property in the Eclipse debugger, and it contains the correct items.
It just doesn't display them in the grid. There must be some way to get it to refresh?
After seeing some other posts, I changed my dataProvider is one of these so I know that an event is being fired, but it doesn't seem to be enough to trigger the grid to refresh what it displays:
    public class MyHierachicalData extends HierarchicalData
        override public function set source(value:Object):void
            Alert.show("Source changed, Firing an event... hopefully this will refresh the grid...");
            super.source = value;
            var event:CollectionEvent =
            new CollectionEvent(CollectionEvent.COLLECTION_CHANGE) ;
            event.kind = CollectionEventKind.RESET;
            dispatchEvent(event);

Similar Messages

  • AdvancedDataGrid - events?

    Hi
    I'm using Flex 3 and I have an AdvancedDataGrid whose dataProvider is a HierarchicalData based on an ArrayCollection.
    The ArrayCollection contains basic Objects, which themselves contain a 'children' property, which is an ArrayCollection again.
    If I set the 'children' property of one of these objects to a brand new ArrayCollection, the change is not reflected on my AdvancedDataGrid. From what I've read I think this might be because the datagrid is listening for CollectionChange events, which any ArrayCollections will fire. But, since I am changing a property on one of my 'objects' in this case (not an ArrayCollection), I think I somehow need to dispatch the same sort of event from my object, so that the datagrid knows to refresh the way that object (and its children) are displayed.
    How can I do this? This is what I've tried:
    myObject.children = <some new ArrayCollection>;
    // OK, myObject has been changed, so need to tell the AdvancedDataGrid about the change
    var colChangeedEvent:Event = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE, fileStructure);
    dispatchEvent(colChangeedEvent);
    But, it doesn't seem to do anything. I'm basically trying to tell the datagrid that it needs to refresh itself because of an Object change.
    I'm very new to Flex and completely stuck right now so any help would be really appreciated.
    Thanks

    Update: I've inspected the <dataGrid>.<dataProvider>.<source> property in the Eclipse debugger, and it contains the correct items.
    It just doesn't display them in the grid. There must be some way to get it to refresh?
    After seeing some other posts, I changed my dataProvider is one of these so I know that an event is being fired, but it doesn't seem to be enough to trigger the grid to refresh what it displays:
        public class MyHierachicalData extends HierarchicalData
            override public function set source(value:Object):void
                Alert.show("Source changed, Firing an event... hopefully this will refresh the grid...");
                super.source = value;
                var event:CollectionEvent =
                new CollectionEvent(CollectionEvent.COLLECTION_CHANGE) ;
                event.kind = CollectionEventKind.RESET;
                dispatchEvent(event);

  • Using DoubleClick and DragManager together in Flex AdvancedDataGrid

    Hi All,
    I have encountered a problem while implementing a DOUBLE_CLICK to the item in an AdvancedDataGrid.
    Scenario:
    I have an AdvancedDataGrid called aGrid. I need to implement DOUBLE_CLICK to the items in an AdvancedDataGrid.
    I have implemented drag functionality in the AdvancedDataGrid.
    [BINDABLE]
    private var _gridColumns:Array = new Array();
    private var aGrid:AdvancedDataGrid = new AdvancedDataGrid();
    I use the following code inside the constructor function
    this.aGrid.columns = this._gridColumns;
    this.aGrid.doubleClickEnabled=true;
    this.aGrid.selectionMode="singleCell"
    this.aGrid.dragEnabled = true;
    this.aGrid.addEventListener(ListEvent.ITEM_DOUBLE_CLICK,testDoubleClick);
    this.aGrid.addEventListener(MouseEvent.MOUSE_DOWN,dragIt);
    this.addColumn(" ","@name"); /*Used to add Columns in the Datagrid*/
    //Also used the following functions
    private function testDoubleClick(e:ListEvent):void
                var item:Object = AdvancedDataGrid(e.currentTarget).selectedItem;
                Alert.show(ObjectUtil.toString(item));
    private function addColumn(title:String, dataField:String, editable:Boolean = false):void
                var newColumn:AdvancedDataGridColumn = new AdvancedDataGridColumn(title);
                newColumn.dataField = dataField;
                newColumn.editable = editable;
                newColumn.rendererIsEditor = editable;
                this._gridColumns.push(newColumn);
    private function dragIt(event:MouseEvent):void
                var adDataGrid:AdvancedDataGrid = event.currentTarget as AdvancedDataGrid;
                if(adDataGrid.isItemSelected(adDataGrid.selectedItem))
                    var di:* = event.currentTarget;
                    var item:Label = new Label();
                    item.text = adDataGrid.selectedItem.@name;   
                    item.setStyle('paddingTop',adDataGrid.mouseY-5);
                    item.setStyle('paddingLeft',adDataGrid.mouseX-5);
                    var ds:DragSource = new DragSource();
                    ds.addData(adDataGrid.selectedItem.@objecttype, 'type');
                    ds.addData(adDataGrid.selectedItem, 'data');
                    ds.addData(this, 'externalData');
                    DragManager.doDrag(di, ds, event, item);
    Issue:
    There is a conflict occuring between the drag and the double click. If I try this code the drag functionality is not getting worked.
    The result needed is both the Double Click and drag functionality should work fine.
    Please help to resolve this issue. Awaiting reply.

    I don't understand the question.  DOUBLE_CLICK implies a mouseDown, mouseUp,
    mouseDown, mouseUp in a short period of time.  It won't fire unless the
    mouse is up so it won't ever be down after it fires.

  • Repeating event doesn't show

    Hello, I am having trouble with one peculiar event type in iCal.
    I sync a Palm with iCal via Mark/Space. Fairly trouble-free. However, I have noticed one small bug.
    My work schedule repeats over two consecutive days and has different start times every second day. For example, on Monday I work 7:00am -3:00pm, same on Tuesday. But Wednesday and Thursday it's 3:00pm-11:00pm, etc. The third rotation is 11:00 pm and ends at 7:00am. I notice that iCal understands the first two sets (I enter one and make it a "repeating event, end on <the following day>), but for the overnight shift, it only displays the first of the two. That second overnight shift does not show up in any view: day, week, or month. My Palm does display it perfectly. Is this iCal not playing nice with events that span midnight?
    Powerbook G4   Mac OS X (10.4.5)  
    Powerbook G4   Mac OS X (10.4.5)  

    Interesting... I've reset my Mark/Space and effectively had the handheld overwrite the iCal and restored all of my calandars. One problem solved. My first problem, the one about the second overnight event, persisted.
    I opened iCal, clicked on the first overnight event, then clicked on the day (xx) of the "end on date" 3/xx/06. Just clicking on this one thing made the second overnight event suddenly appear. I hadn't even changed the day, I just highlighted it. I repeated this for each of the buggy overnight events and it fixed each one.

  • AdvancedDataGrid Drag Drop Error

    I'm running into an issue where AdvancedDataGrid is not
    accepting drag and drop from controls that do not implement
    dataprovider in HierarchicalData format. If i change the ADG's
    dataprovider to a flat arraycollection then it will be able to
    receive drag drop from other controls. I've tried overridding the
    drag events to accept the drops but that still does not work. What
    key info am i missing to get a HierarchicalData format ADG to
    accept drag drop items from other controls?

    5 years late, but I just ran across the same issue and this is what worked for me:
    protected function dragOverHandler(event:DragEvent):void {
        event.preventDefault();
        DragManager.showFeedback(DragManager.COPY);
        AdvancedDataGrid(event.currentTarget).showDropFeedback(event);

  • Stationary rows in a drag and drop AdvancedDataGrid

    I have an AdvancedDataGrid that has drag-and-drop capabilities. The one caveat is that I don't want to be able to move the first or last rows in the grid. So if a user tries to drag one of these rows it is disallowed or if a user tries to drop another row into the first or last row it is disallowed. Does anyone know how I would do this?
    Thanks

    Found the answer
    private function dragDropHandler(event:DragEvent):void{
                    var dropTarget:AdvancedDataGrid = AdvancedDataGrid(event.currentTarget);
                    var index:int = dropTarget.calculateDropIndex(event);
                    if( index == 0 || index == event.currentTarget.dataProvider.length -1){
                        event.preventDefault();
                        event.stopImmediatePropagation();

  • Advanced datagrid question

    Hi All,
    I have an ADG displaying items in groups showing totals for each group using:
              private function summFunc(cursor:IViewCursor, dataField:String, operation:String):Number{
                    var sumAll:Number = 0;
                    while (!cursor.afterLast)
                        if (dataField == "Amount")
                            sumAll += Number(parseFloat(cursor.current["Amount"]));
                        cursor.moveNext();
                    return sumAll;
              <mx:dataProvider>
                <mx:GroupingCollection id="groupedData" source="{acSampleADG}" >
                    <mx:Grouping>
                        <mx:GroupingField name="Series" >
                            <mx:summaries>
                                <mx:SummaryRow summaryPlacement="last" summaryObjectFunction="summObjFunc">
                                    <mx:fields>
                                        <mx:SummaryField dataField="Amount" summaryFunction="summFunc" />
                                    </mx:fields>
                                </mx:SummaryRow>
                            </mx:summaries>
                        </mx:GroupingField>
                    </mx:Grouping>
                </mx:GroupingCollection>
            </mx:dataProvider>
    Amount column is editable. If I change the value for an item the total for the group is not updating.
    How can I refresh that value?
    Thanks
    Johnny

    I figure out to skip the error in my ITEM_EDIT_END event.
    Now if I use groupedData.refresh() it puts the old values back. Is this a bug?
    Any ideas?
    Johnny
    Here is my fuction for  ITEM_EDIT_END event.
    private function update_ADG_values(event:AdvancedDataGridEvent):void{
        var grid:AdvancedDataGrid = event.target as AdvancedDataGrid;
        if(event.dataField=="Amount"){
            acSampleADG.refresh();
            myADG.validateNow();
            var myEditor:TextInput = TextInput(event.currentTarget.itemEditorInstance);
            var newVal:Number = parseFloat(myEditor.text.replace(",",""));
            var oldVal:Number = Number(event.itemRenderer.data[event.dataField]);
            if (event.reason == DataGridEventReason.CANCELLED || event.reason == DataGridEventReason.OTHER || oldVal == newVal) {
                event.preventDefault();
                grid.destroyItemEditor();
                return;
            groupedData.refresh();

  • How to get label of Parent level nodes, when itemOpen() event of any node in AdvancedDataGrid in Flex?

    Hi all,
              This is the code, to get the label of every one parent level nodes, when we open the parent node item in AdvancedDataGrid in Flex.
    <?xml version="1.0"?><!-- dpcontrols/adg/SimpleGroupADGMXML.mxml --><mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert; 
    import mx.events.AdvancedDataGridEvent; 
    import mx.collections.ArrayCollection; [
    Bindable] 
    private var groupData:ArrayCollection = new ArrayCollection([{Computer:
    "HardWare Devices", Device:"Keyboard", Company:
    "Logitech", PriceInRupees:"500"}, {Computer:
    "HardWare Devices", Device:"Keyboard", Company:
    "Microsoft", PriceInRupees:"500"},{Computer:
    "HardWare Devices", Device:"Mouse", Company:
    "Logitech", PriceInRupees:"300"},{Computer:
    "HardWare Devices", Device:"Mouse", Company:
    "Microsoft", PriceInRupees:"300"},{Computer:
    "HardWare Devices", Device:"Monitor", Company:
    "LG", PriceInRupees:"5000"},{Computer:
    "HardWare Devices", Device:"Monitor", Company:
    "Microsoft", PriceInRupees:"5000"}]);
    //This method is used to get label of every parent lavel nodes, when we open any item 
    private function getLabel(e:AdvancedDataGridEvent):void{
    Alert.show(e.item[
    "GroupLabel"]);}
    ]]>
    </mx:Script>
    <mx:Label text="NOTE : Open the every parent level nodes here. We can get the label of every one parent level nodes."color="
    blue" fontWeight="bold"/>
    <mx:AdvancedDataGrid id="groupADG" width="
    100%" height="437" initialize="gc.refresh();" itemOpen="getLabel(event)"
    >  
    <mx:dataProvider>
    <mx:GroupingCollection id="gc" source="{groupData}">
    <mx:grouping>
    <mx:Grouping>
    <mx:GroupingField name="Computer"/>
    <mx:GroupingField name="Device"/>
    </mx:Grouping>
    </mx:grouping>
    </mx:GroupingCollection>
    </mx:dataProvider>  
    <mx:columns>  
    <mx:AdvancedDataGridColumn headerText="
    Computer"/>
    <mx:AdvancedDataGridColumn dataField="Company"headerText="
    Company"/>
    <mx:AdvancedDataGridColumn dataField="PriceInRupees" headerText="PriceInRupees"/>
    </mx:columns>
    </mx:AdvancedDataGrid>

    Dialog\ResponseTime 6585
    "The dialog response time consists of the period of time from the request of the dialog to the dispatcher through the processing, to the ending of the dialog in the dispatcher and the transfer of the data to the presentation layer"
    This is not buffered as far as I know is measured on demand
    Read,
    http://help.sap.com/saphelp_nw70/helpdata/en/31/d7843b43c8e937e10000000a11402f/content.htm
    Regards
    Juan

  • Event issue in HeaderRenderer in AdvancedDataGrid

    I have a requirement of reading all my ADG headerRenderer text input data (All columns are having textInput as a headerRenderer).
    For achieving this I have registered an event listener in the headerRenderer which reads the text of textInput and keeps it in an Array.On click of a button labled Filter,dispatching that event.But I observed each instance of the headerRenderer getting called twice.
    Any inputs on this issue will be appreciable!

    Sorry ,this is my exception when I am using papi
    fuego.papi.exception.ProcessesNotAvailableException: Some processes are not available.
    Internal Exceptions:
    /PRO/ENG/VAL/ProcessHandler#Default-1.0:Process '/PRO/ENG/VAL/ProcessHandler#Default-1.0' not available.
         at fuego.papi.impl.ProcessManager.get(ProcessManager.java:1088)
         at fuego.papi.impl.ProcessServiceImpl.getProcesses(ProcessServiceImpl.java:1528)
         at fuego.papi.impl.SessionProcessManager.getProcesses(SessionProcessManager.java:384)
         at fuego.papi.impl.ProcessServiceSessionImpl.processesGet(ProcessServiceSessionImpl.java:2559)
         at fuego.papi.impl.ProcessServiceSessionImpl.processesGet(ProcessServiceSessionImpl.java:2547)
    Thanks
    Sailendra

  • Changing event time is buggy

    When I crete ann event... then choose to edit the iCal event... in the edit window I click on the time area to update the time and:
    1. the view now overwrites the entry it is see thru and is hard to read
    2. the time is not modifiable consistently -  sometimes the cursor will highlight the time in blue and allow a change ... sometimes it won't.
    Anyone else experiencing this and do you have a solution?

    Check Date and Time prefs on your laptop. Is the time correct, and are both devices using the same time zone?

  • ICal Misbehaving - deleted events reappear and editing buggy

    My iCal is not behaving properly—every time I try to delete an event it
    re-appears a moment later and every time I try to edit an event it makes the
    change, but leaves a duplicate of the original.
    My iCal is not behaving properly—every time I try to delete an event it re-appears a moment later and every time I try to edit an event it makes the change, but leaves a duplicate of the original.
    I tried looking for a downloadable version (I am currently using version 4.0.4) to re-install it, but I cannot find a version that will install.
    iCal seems to work fine in other accounts, restarting / logging off and returning to my account doesn't help.

    Are you syncing with anything?
    AK

  • Buggy events handling

    I'm handling event on sales forms UDFs i've added.
    two UDFs (columns in items matrix) are comboboxes with yes/no and the third combobox column is linked to a master data table.
    Upon selecting in the third combobox, the first 2 comboboxes are changed (using .select method) and that works fine (notice that these .select methods are called from within a 'combobox select' event).
    the problem is when I run the .select method of the comboboxes within a CFL event of column "1" (the item code in the line).
    even though I see all the relevant lines being executed (by stepping), the comboboxes just don't want to be selected.
    Has anyone seen anything like it?

    Avi,
         U better to set the combo value by default for that two combo yes/No.
    By
    oCmb = PO_Frm.Items.Item("comb").Specific
                If oCmb.ValidValues.Count = 0 Then
                    oCmb.ValidValues.Add("0", "No")
                    oCmb.ValidValues.Add("1", "Yes")
                End If
                oCmb.Select(0, SAPbouiCOM.BoSearchKey.psk_Index)
    If it is helpful give me points,
    Regards,
    Anitha

  • Dropdown box - which event handler to use ?

    I am having trouble with setting the readonly property (via Javascript) of the adjacent textbox to my dropdown box when the index value is a certain number.
    I tried using MouseUp, MouseDown, and even OnBlur....but the readonly does not seem to be getting set to true or false consistently.
    Could this be a timing issue ? The textbox that I am trying to control is the next tab-order control in the list of controls for this page.
    This same logic is working fine in the MouseUp event handler for check boxes. So I am just wondering if this is a bug or must my implementation change to accomodate dropdown boxes ? For instance, should I move the logic to the Enter event handler of the textbox instead ? Can a control's own eventhandler set itself to readonly when it is the active form field ?

    After tons and tons of testing time, I've come to the conclusion that dropdowns are totally buggy in 11.0.07 release of Acrobat Pro.
    Even if you set the "commit values immediately", you get the PRIOR selected item's value as the event value, not the CURRENT one.
    This occurs in a Validate event handler script. I have not been able to use any other event handlers for a dropdown except the OnBlur....and then, for my purposes, IT'S TOO LATE !!!
    This is totally worthless as I need to setFocus() and set fields to readonly based on the immediate dropdown offset or face value.

  • Issues: new events show from google calendar but not the other way round

    Hi,
    I've just followed the instructions to the letter on these pages: http://support.google.com/mobile/bin/answer.py?hl=en&topic=14252&answer=138740
    & http://support.google.com/mobile/bin/answer.py?hl=en&answer=139206 and looked at the known issues page, but I am still stuck.
    Entries in my Google Calendar have now synced in iOS Calendar (and weekcal which I use instead of iOS Cal) - however, none of my existing entries in my iOS Cal have synced with Google Cal.
    Here are the issues:
    A recurring event created by someone else and me invited showed in iOS when I set this up
    None of my events from iOS show in Google Calendar
    New events I create in Google Calendar do not show in iOS
    New events I create in iOS don't show in Google Calendar
    To test, I deleted the recurring event which was the only one showing on iOS - immediately it was also deleted on iOS which indicates it is set-up to sync betweeb Google and iOS
    Cannot find any information on help pages about this.

    I'm not sure what else to suggest. As the Nokia 5800 is not natively supported by iSync you must be using an iSync Plugin, so I'd advise contacting the author of the plugin - it may be buggy and need fixing.

  • Creating a book: view all photos by events

    When building a movie, you click on the camera icon and access all your photos in iPhoto, by event, album, whatever.
    Why can't you see them that way when building a book in iPhoto?
    The dropdown for photos in your build window not only doesn't show ALL your photos, it is really buggy about what it shows.
    It offers All Photos in Project, Placed Photos in Project, Unplaced Photos in Project, Last Import, Last 12 Months, Flagged, and THEN randomly lists ONE event... and even when you click on that event, it doesn't always pull THOSE pix. So, then I started trying to TRICK it to show what I needed. VERY annoying.
    And, since the iMovie program already has that set up, WHY can't it be that way in iPhoto.
    The presumption seems to be that, if you are building a book in iPhoto that you've already identified all the pix you want and have created a separate folder or something. But, sometimes the book might be a representation of say, 20 years of marriage, or something like that, and you want to be able to peruse all your event folders...
    PLEASE can this be considered?
    I am going to post this directly to Apple too, but thought I'd vent here.

    I may not have been clear in my description.
    When building a book, the bottom right corner of the screen shows icons for Add Page, Layout, Options, and Photos. When you click on photos, the ones that are available are as listed in my previous post (All Photos in Project, Placed Photos in Project, Unplaced Photos in Project, Last Import, Last 12 Months, Flagged, and one randomly selected event), but it's not a list of events, albums, etc, like it is in iMovie.
    In addition, as noted previously, the actual images that appear when I select that randomly selected event aren't always the ones from that event. That appears to be a bug.
    So, the question I posed isn't about how to view photos in the main iPhoto module, but in the BOOK module.
    Does that make sense?

Maybe you are looking for

  • Canon MP450 - Driver not showing up in Print Settings

    Has anyone had success using the Canon MP450 I have tried every driver but cant get it to show in the Printer Selection preferences

  • How do I align a placed image in a frame using JS?

    I am new both to javascript and to scripting for InDesign, so please bear with me on this question. I am trying to align an image in a graphic frame so it aligns to the top right corner of the frame. I can do this using the InDesign interface by foll

  • Trouble with titles

    I'm trying to add a title over a picture in iMovie (Picture is already in timeline viewer, using KBE). When I type the title out, and click "Preview" it will show it to me just like I want it, but when I try to drag it onto the timeline viewer it put

  • Check for updates always pops up file dialogue

    My iPhone is connected and I have updated to iTunes 10.5, but everytime I click the check for update button it brings up the file selection dialogue as if I had option+clicked it.  I can't find an obvious cause for this sort of behavior, but I would

  • Calling on the help of fellow BT users

    Hello fellow BT users, I seem to be having a problem with BT and any website that is hosted by "The Planet". I have so far managed to confirm with two other BT user that they are also having the same problem, but I'd like more users to possibly confi