Updating the dataprovider of a datagrid with itemrenderers throws renderers

Hello all,
I've run into a problem that I can't seem to figure out.  I have a datagrid that is bound to an arraycollection as the data provider.  A few of my DataGridColumns have itemrenderers.  The renderers work great on the first run, but once the dataprovider is updated, my datagrid renderers fall apart.
My renderers basically highlight cell items that fall into a particular range. Interestingly, if I have an itemrenderer attached on any dataGridColumn, I get a few repeating/identical rows and itemrenderes that are active in places that they shouldn't be once the dataprovider is updated. Has anyone run into this? How did you solve this? Thanks in advance!!
Mike

Another way to create itemRenderer for datagrid is to have a custom components that implements these objects
mx.controls.listClasses.IDropInListItemRenderer,mx.controls.listClasses.IListItemRenderer, mx.core.IFactory
For example
<s:SkinnableContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
implements="mx.controls.listClasses.IDropInListItemRenderer,mx.controls.listClasses.IListItemRenderer, mx.core.IFactory">
private var _data:Object;
private var _listData:BaseListData;
public function newInstance():*
     return new myItemRenderer; // name of your renderer
public function set data(value:Object):void
     dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
[Bindable("dataChange")]
public function get data():Object
public function set listData(value:BaseListData):void
public function get listData():BaseListData
</s:SkinnableContainer>

Similar Messages

  • Updating the dataprovider of a datagrid

    I have a datagrid with an arraycollection as the
    dataprovider.In one of the columns there is a combobox used as the
    itemeditor.I want the user to select values from the combobox and
    when a submit button is clicked the datagrid dataprovider needs to
    be updated.
    Once the submit is pressed,he should not be able to change
    the values using any of the comboboxes where he has already
    selected some values.

    The only way I can see to do that would be to have the
    database default to null values in all the columns, and then check
    for that with your edit handler. We use managed collections at
    work, which means a second collection would be required; one to
    store the temporarily selected values, the other to stay connected
    to the data in the dataBase. Edit the temporary collection, and
    then when the Submit button is clicked, copy the temporary
    collection over to the one linked collection. Maybe one of the more
    experienced users on here has another solution? I don't know.
    This is the kind of event handler I am talking about,
    BTW:

  • No major shortcomings keyboard arrow key. even if the text part of the message you clicked the arrow keys to update the screen would be great. with an update on my idea, and so it would be more useful

    no major shortcomings keyboard arrow key. even if the text part of the message you clicked the arrow keys to update the screen would be great. with an update on my idea, and so it would be more useful

    greghcrash wrote:
    It Would be great to have keys on the onscreen keyboard.
    Such as a computer keyboard.
    With BACKSPACE, TAB WITH SETTINGS, DELETE, TYPE OF TYPE, BOLD TYPE, UNDERLINE ETC....
    I HAVE A KEYBOARD COVER AND IF I NEED TO USE CERTAIN KEYS I HAVE TO SWITCH TO MY KEYBOARD CASE AND THAT IS VERY INCONVENIENT.
    IT IS ALSO A TIME WASTER.
    When you installed iOS 8 did you read about the new features? Applications can create custom keyboards…
    http://www.imore.com/custom-keyboards-ios-8-explained
    You need to look for an app that has a custom keyboard with the features you require, I suggest you find one without CAPSLOCK
    greghcrash wrote:
    IT IS ALSO AGGRAVATING WHEN TYPING AND IT AUTOMATICALLY CHANGES THE WORDS THAT YOU WANT TO USE.
    THANK YOU FOR YOUR TIME
    Again you need to look at how to manage the device - these settings can be turned off already & you can edit the 'suggestions' too.
    Settings > General > Keyboards > turn Auto-Correction Off.
    Sadly you cannot disable autocorrect temporarily, so it's all or nothing.

  • [svn:bz-trunk] 8823: Updated the sample messaging-config. xml with the new disallow-wildcard-subtopics configuration element.

    Revision: 8823
    Author:   [email protected]
    Date:     2009-07-27 09:12:08 -0700 (Mon, 27 Jul 2009)
    Log Message:
    Updated the sample messaging-config.xml with the new disallow-wildcard-subtopics configuration element.
    Modified Paths:
        blazeds/trunk/resources/config/messaging-config.xml

    Hi,
    could you let us know what version of OEPE you were running prior to the upgrade along with the Eclipse version ? Also was the previous installation a full OEPE install or was it installed via the update site ?
    thanks
    Raj

  • How do you update the ipad 4.3.5 with a computer?

    how do you update the ipad 4.3.5 with a computer?

    Update it from iTunes on a computer as described at the bottom of this article; there isn't a Software Update option in General on iOS versions prior to 5.0. It can only be updated directly to the newest iOS release supported by the device’s hardware, which is iOS 7.1.1 for devices with at least 512MB of RAM.
    The maximum iOS version for the third generation iPod touch and original iPad is 5.1.1.
    If you don't know what device you have, append the last three characters of its serial number to http://www.everymac.com/ultimate-mac-lookup/?search_keywords= and load the page.
    (108171)

  • Trying to connect with my father on Facetime and all we get is connecting but never connect. Have updated the software, Trying to connect with my father on Facetime and all we get is connecting but never connect. Have updated the software

    Trying to connect with my father on Facetime and all we get is connecting but never connect. Have updated the software, Trying to connect with my father on Facetime and all we get is connecting but never connect. Have updated the software

    Hello trailblazer59,
    The article linked below provides some useful troubleshooting steps that can help get FaceTime working on your iPhone.
    iOS: Troubleshooting FaceTime
    http://support.apple.com/kb/TS3367
    Cheers,
    Allen

  • I cannot update the apps that came installed with my MacBook Air

    When Software Update says I have apps to update, it will not let ne update the ones that came installed with my macbook air, OS 10.8.2. App stare says to login as the user who originally purchased, yet I am logged in as that user. Have tried loggin out and back in but that does not work. Any ideas?

    Hello ,
    Thanks for using Apple Support Communities.
    To reinstall the iWork applications that came with your computer, simply follow the directions below to get them back.
    Mac App Store
    Open Mac App Store.
    Click Purchases at the top of the window. Your purchased apps will appear.
    Click Install or Download.
    Download past purchases
    Take care,
    Alex H.

  • "busy updating the site" message: something wrong with comp. or real update

    Hello
    I bought a nano yesterday and I never had iTunes before...yesterday night i wanted to download iTunes and there was a message: "We are busy updating the site, please check back in an hour or so...." at http://www.apple.com/ca/itunes/download/ and at http://www.apple.com/itunes/download/
    The message is still there. Is it just me or is there anything wrong with my computer? I went to the Apple software update program and am downloading iTunes version 7.4.3. Is that alright? will I be able to use it? Or should I wait for apple to finish updating their site (assuming my computer is fine)?

    I am getting this too and since the message sounded odd and I wondered WHY they would do this on a Friday afternoon, I checked using another PC, and guess what - one PC has that message and the other one doesn't. I therefore suspect some malware is actually redirecting us to another page entirely. I do not think this is an Itunes problem at all. I was able to download and install witht he other PC jsut fine. I'll check back here - please post if you get any mroe info and I will too.

  • Update the System in C# WinForms with InstallShield

    I already created the application and install it on my own computer and other computers. I created the set up of my application using InstallShield 2013 and I want to update my system to the latest version. From version 1.00 to 1.01 . Is that possible with
    InstallShield 2013? If so, could you guys please tell me where do I have to start first in order to get the update system (updater and auto-update system)?
    Thank you guys!
    Your answer much appreciated!

    Installshield is a third-party product.  These forums are for MS technologies.  Please post your question in the InstallShield forums.

  • Update the table when Document successfull with BDC

    Hi,
        I am changing the Billing document header and item level using BDC call Transaction. When the document is success fulley saved at that time I have to modify the flag in the table with 'X', when it fails or if it has errors I have to set the Flag as 'F'. Could please any body tell me how can I do this.
    Thanks & Regards
    Venkat

    Hi,
    In the call transaction do the following :
    Data : it_msg type standard table of bdcmsgcoll.
      CALL TRANSACTION VA01 USING it_bdcdata
                       MODE   'N' 
                       UPDATE 'A'
                       MESSAGES INTO it_msg.
    READ TABLE it_msg INTO  wa_msg WITH KEY msgtyp = 'E'
                                              msgtyp = 'W'.
    if sy-subrc eq 0.
    update ZTABLE set flag = `F`
            where <condition>.
    else.
    update ZTABLE set flag = `X`
            where <condition>.
    endif.
    Best regards,
    Prashant
    Message was edited by: Prashant Patil
    Message was edited by: Prashant Patil

  • HT5622 I am trying to update the apps on my MacBook with my Apple ID, the one I created long ago when I got my first iPhone. Although when I first got my new MacBook I created a new apple ID with a email address I hardly ever use, and a password I can't r

    Yes, well I ignoratly created a second Apple ID when first setting up my MacBook, and when I go to the "My Purchases" in my Mac App Store, and it shows the apps I've uninstalled, and the apps that are available to update. When I tap on the update icon/text I get a drop down notice, telling me that I have other apps that can be updated using the Apple ID I used to purchase the *apps* in Mac App Store. As far as I am aware  I have only used ONE  Apple ID to purchase Mac Apps, iPhone Apps, and iTunes. I have tried MANY, MANY times to find my second Apple ID. I've gone through and used every email address I making sure non of them were my second Apple Id's . SO is there anyway that I can update my apps using my main apple ID?
    Best Regards,
    Anna Grace Y.

    What are the names of the apps?
    So you are saying that you only ever used the old Apple ID to buy content on the iPhone and the Mac? You never used the new Apple ID to buy content for the Mac?

  • I just installed Mac OS Mavericks, and now my Creative Suite Premium won't work.  I have an education version.  Where do I go to update the software to be compatible with Mavericks?

    Does anyone know how I can update my Creative Suite Premium (Education version) to work with OS Mavericks?

    You need to tell us what Creative Suite version you're using for us to help you.
    Also, did you try to migrate your copy from one computer to another?

  • When i update the current version of firefox with the latest version. can i delete the original version.

    why cant i get a straight answer to a very simple question.

    if you made a custom installation wherein you opt to have a different installation path, then you may have to delete the previous installed version.
    if you made a default installation wherein you opt to have an "upgrade installation", then the original version need not be uninstalled.
    having two installation paths will result to two working mozilla firefox browsers but each time you launch a version, an "add-on compatibility check" will always occur.
    for best results, always do an "upgrade installation" unless you want to try a new version first by checking it out.

  • CAN I UPDATE THE LATEST VERSION OF FIREFOX WITH WINDOWS XP VERSION 2002 SERVICE PACK 3 ?

    I HAVE A DELL DIMENSION 2000 COMPUTER

    Firefox 3.6.8 does run on Windows XP. Here are the system requirements:
    http://www.mozilla.com/en-US/firefox/system-requirements.html
    Please make a backup of your profile before installing. See [http://support.mozilla.com/en-US/kb/backing+up+your+information Backing up your information].
    As for Firefox 4 beta, I have no idea.

  • DataGrid with dynamic columns & renderers

    I'm developing using Flash Builder 4 & Flex SDK 4.1.
    I need to manage very dynamic DataGrid components and keep their definitions, which are all part of a complex item renderer of an Offers list.
    The objects structure is simplified as follows -
    Data: Model --> Offers ArrayCollection --> Offer VO --> DataGrid data ArrayCollection & DataGrid columns Array
    View: List --> Offer Item Renderer --> DataGrid
    1. Since the DataGrid's columns property accepts only an Array (not ArrayCollection), it seems like Data Binding for defining the columns is very problematic.
    I tried to bind it to the source property of an ArrayCollection that would keep my columns definitions, but it didn't really work (mainly header display bugs).
    What is the recommended way to keep the dynamic columns definition of a DataGrid?
    2. Each column can have a set of dynamic properties, so I created a "mutant" - Column VO that extends DataGridColumn and got a dynamic properties ArrayCollection on it.
    The columns got a custom header renderer that includes an icon when there are properties.
    The header renderers got 4 main states (NotSelectedWithProperties, SelectedWithProperties, NotSelectedWithoutProperties & SelectedWithoutProperties).
    However, the header renderer area seems a bit buggy when maintaning dynamic columns.
    Any thoughts on the subject?
    3. Anyway, I ended up recreating the DataGrid's columns Array very often (copying the columns definition on the offer's item renderer's dataChange event handler).
    Note that the dynamic properties can be edited when the column is selected and I copy their values from the view back to the model when entering the state NotSelectedWithProperties.
    This feels way too complicated and I really try to keep it simple, inspite of the required complexity.
    Does anyone have better ideas?
    4. In some cases the column's item renderer should also be modified into another DataGrid (grid-in-grid).
    I used the MXDataGridItemRenderer with a DataGrid and included an ArrayCollection for the "newValue" returned by the editor.
    (I use RendererIsEditor=true and on updateComplete populate that variable with the DataGrid's dataProvider contents)
    When needed, I loop though the data objects of the parent DataGrid and populate the related field with an ArrayCollection of key-value objects that are displayed on the internal DataGrid.
    After adding this feature I encounter very strange bugs -
    a. After editing the grid-in-grid values and changing the column's state (selecting & deselecting), I get the following exception:
    ArgumentError. Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/setChildIndex()
    at mx.core::UIComponent/setChildIndex().......6993....
    All I could find about this is that it might be related to some context error or something, but I'm really stuck on this one.
    b. Sometimes another column might copy value from one row to another, running over the previous value.
    I'm not sure exactly what sequence of actions causes this behavior, but it's related to that itemRenderer for sure.
    c. Switching places with a column that uses the grid item renderer (headerShift) causes a stak overflow of StyleManager that tried to get style from the DataGridItemRenderer. This one I just found out, but couldn't reproduce a second time... strange!
    I'm pretty sure this caused another problem that I don't remember at the moment.
    The bottom line is that there got to be a better way to implement this feature within this already-complicated environment.
    Maybe I'm doing something very wrong here...
    Please advice and thanks for reading all this.

    Update on item 4a -
    This was a major issue (the main reason for opening this thread really) and I managed to resolve it!
    As part of my application, I override the default DataGrid behavior for column selection (headerRelease event).
    Instead of sorting, I change the column's header looks and define it as Selected (for showing its dynamic properties and enable its deletion).
    At first I did this by setting styles, but the look didn't refresh unless I created a new instance of the header renderer.
    Later I changed thi behavior to work with states, but I left the new header renderer instance creation commands and those lines created all the mess!
    Conclusion -
    If you define a custom header renderer for your datagrid column and then a custom item renderer, don't create a new instance of your header renderer!
    It would still be nice to get some response for the other issues I raised.
    Thanks and have a nice week.

Maybe you are looking for

  • Your computer shut down because of a problem. Mac grey screen

    Recently I have been having issues with my Mac. The computer will freeze for no apparent reason and the screen goes ever so slightly blue, then crashes to grey screen - 'Your computer has shut down... blah blah blah' and then it restarts itself and i

  • How to fire a trigger from java in oracle

    Is it possible to fire/ call a trigger from java ? Is there any way ?

  • Filter on Rank function 10g

    Hi Friends, Need your help. Please!!! I have used the RANK function to know the different Start, end date period for a Enrollment.NO. What I want next is to show only the Enroll No, start, end date for a Enrollment No. with the earliest start date, e

  • One email remains in the user's outbox

    Hi, One email remains in the user's outbox in SAP. All other emails to external addresses are working. The recipient's email address is correct. There is no error in the Event viewer. In table ALR1 the status is 'P'. What does status 'P' mean? Any id

  • Where can I find a document after upgrading to the most recent OS on my iMac?

    I upgraded my OS yesterday on my iMac and now I can't find the most recent version of an Excel document.  I saved it as recently as yesterday when making changes but the document that shows up is from 9/10.  Any ideas where I might find it?  I've alr