Datagrid Itemrenderer scrolling problem

Hi,
I have a datagrid bound to an ArrayCollection. For one column
I have a custom item renderer - which is a textbox.
It works OK except when you scroll the rows and values get
jumbled up randomly.
I'd be grateful if anyone has any ideas.
Thanks,
dan

Hi Keytree,
Many thanks for the explanation.
However i still can't get it to work.
Please find the codes below and please check and advise if
i've missed something.
thx and regards
Benoit
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="
http://www.adobe.com/2006/mxml"
horizontalAlign="center">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
// Define a property for returning the new value to the
cell.
public var result:String="";
[Bindable]
private var dp: Array = [
{label:"None",data:1},
{label:"Amt", data:2},
{label:"%", data:3}
public var retObj:Object;
public static var test:Number=0;
// Override the set method for the data property.
override public function set data(value:Object):void
test++;
retObj=value;
//Alert.show(new String(test));
super.data = value;
if (value != null)
var currentValue:String = value.size;
var len:int = dp.length;
for (var i:int = 0; i < len; i++)
if (dp
.data == currentValue)
editor.selectedIndex = i;
break;
override public function get data():Object
return retObj;
public function onChange():void
//what need to be set here??
]]>
</mx:Script>
<mx:ComboBox id="editor" dataProvider="{dp}" width="130"
change="onChange()"/>
</mx:VBox>

Similar Messages

  • DataGrid Horizontal Scroll Problem when datagrid contains Item renderer

    I have datagrid with horizontal scroll policy enabled. Grid
    contains some item renderer also.One of the item renderer is
    datefield when i select a date from the datefield and say the
    adjacent cell of the grid also contain datefield itemrenderer
    and i am selecting date from that itemrenderer also.When i
    scroll horizontally the date in the itemrender changes to any one
    of the two itemrenderer.Some time it works fine.I am getting the
    issue for combobox itemrender also.Can any one help me to solve
    this issue.

    "happybrowndog" <[email protected]> wrote in
    message
    news:ge11ag$jdo$[email protected]..
    >
    quote:
    Originally posted by:
    ravi_bharathii
    > I have datagrid with horizontal scroll policy enabled.
    Grid contains some
    > item
    > renderer also.One of the item renderer is datefield when
    i select a date
    > from
    > the datefield and say the adjacent cell of the grid also
    contain datefield
    > itemrenderer
    > and i am selecting date from that itemrenderer also.When
    i scroll
    > horizontally
    > the date in the itemrender changes to any one of the two
    itemrenderer.Some
    > time
    > it works fine.I am getting the issue for combobox
    itemrender also.Can any
    > one
    > help me to solve this issue.
    >
    > Ravi, I am having a similar problem. I subclass a
    TextInput as an
    > itemrenderer for a column in a datagrid. My subclassed
    TextInput checks
    > to see
    > the value in the overriden set() method, and depending
    on the value, sets
    > the
    > background color of the TextInput to green. When the
    datagrid scrolls
    > horizontally, some unrelated cell colors also change
    green and some of the
    > data
    > gets duplicated in the cells. The underlying data
    provider's data is not
    > confused however. Seems the rendering is screwed up when
    the Datagrid
    > scrolls.
    >
    > Did you find a solution to this problem? I think
    Datagrid is a piece of
    > screwed up code.
    http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf
    Q2

  • DataGrid itemRenderer column problem

    I have searched high and low and have not found a solution so I'm hoping someone here can help me out.
    When I start up my application, my datagrid (one of the columns uses a itemrenderer) that column, displays everything but it spills / shows funky, then when I scroll some of them get fixed. I don't know exactly what causes this or how to fix it. The column I'm talking about is the "Like" column.
    If code is needed I will provide a pastebin link when requested, and I have attatched a screenshot of what the problem is.
    Any help / suggestions would be appreciated

    Upgrade to 3.4.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • DataGrid.itemRenderer Property problem

    Hi newbie to AS3:
    I have a DataGrid built dynamically with AS3 where
    I need to change the color of a certain row.
    I tried the following code but Its usage is certainly wrong:
    cDtgc1.itemRenderer = cDtgc1.getItemRendererFactory(false,
    BackgroundComp);
    BackgroundComp is a class included is the code below.
    How do I use this factory? The way I have it it is not
    executing
    Thanks.
    Text

    try:
    cDtgc1.itemRenderer = new ClassFactory(BackgroundComp );
    for some alternatives try this:
    http://weblogs.macromedia.com/pent/archives/2007/02/coloring_the_ba.html
    ATTA

  • Datagrid display scrolling bug?

    Hello,
    I'm developing an AIR application using the 4.1 SDK and have come across inconsistent display behavior from a datagrid when scrolling.
    My datagrid has three fixed columns created in MXML with the DataGridColumn tag.  When the datagrid fires a creationComplete event, I then dynamically add additional columns to it, setting the column item renderer to an MXML component.  This is all rather straightforward and when I start the application, everything looks just fine.  However, once I scroll the datagrid, either vertically or horizontally, the values from the dynamically created columns change or empty cells are displayed in their place.  They change every time I scroll.  The fixed columns don't exhibit this behavior.
    Has anyone encountered this issue?  Is this a Flex bug and is there a workaround?
    Your help is appreciated.
    Thanks,
    -Jose

    itemRenders in DataGrid and other list based controls are recycled, so this often causes problems for scrolling "depending on what you are doing".
    Show code and we may be able to help more.
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex Training and Support Services

  • Datagrid vertical scrollbar problem

    I wrote a search function for a datagrid component. The
    dataprovider is a ArrayCollection variable. If the item is found in
    the array, set the item to be selected in the datagrid. The problem
    is when the selected item is at bottom of the datagrid, the
    scrollbar doesn't refresh so I have to manually move the scrollbar
    to see the selected item. Here is part of my code:
    <mx:Script>
    <![CDATA[
    ......(populate accountData using dataservice)
    accountDS.fill(accountData);
    private function findAccountById(id:String):void
    var size:int = accountData.length - 1;
    for(var i:int = 0; i< size; i++) {
    var account:Object = accountData.getItemAt(i);
    if(account.accountNumber.search(id) != -1)
    dgAccount.selectedIndex = i;
    break;
    ]]>
    </mx:Script>
    <mx:ArrayCollection id="accountData"/>
    <mx:DataService id="accountDS"
    destination="accountlist"/>
    <mx:Panel >
    <mx:DataGrid id="dgAccounts" dataProvider="{accountData}"
    editable="false">
    <mx:columns>
    <mx:DataGridColumn dataField="accountNumber"/>
    <mx:DataGridColumn dataField="accountType" />
    </mx:columns>
    </mx:DataGrid>
    </mx:Panel>

    You need to look at the API for DataGrid. Particularly the
    property "verticalScrollPosition".
    The logic in your expectation that setting selectedIndex
    should update the scroll position is flawed. What if you selected
    an item with the mouse and then wanted to browse the other options?
    You would use the scroll bar for this. Your selection might
    disappear from the list but you would want it to stay selected.
    Thus the scroll position and the selected index are completely
    independent of one another.
    The point I am trying to make is this: you are required to
    set the verticalScrollPosition when you set selectedIndex if you
    want them to work in concert.

  • Still the same issue: Scrolling problem in itunes w/ dual screen setup

    Hey there,
    I am getting really ****** here. For 2 months this problem has been bugging me. It seems to randomly appear and disappear.
    Just have a look what is happening here: http://www.youtube.com/watch?v=N2m4G6c2Tqo
    I basically tried everything.
    1.Reinstalled Windows from scratch twice!
    2 Reinstalled Itunes a couple of times - clean install - tried different versions. Yea, got the latest one now.
    3. Tried different VGA drivers. Got the latest Intel driver installed.
    The problem has been gone for a couple of weeks now ever since I uninstalled a Windows update called U2711 Dell Display driver (The U2711 is my current LCD). That was just a 80KB file that messed Itunes up.
    Well, I believed I found the problem (hail system restore) but nope. Today it started happening again. I even have Windows Update deactivated for that reason so no changes have been made to the system in the last couple of days! It worked fine yesterday.
    So again: Same scrolling problem. And it only happens on my second large 27" screen. On the notebook screen it works just fine.
    Guys, I really need help. I'm about to curse Apple and Microsoft at the same time.
    Cheers
    K

    Since I am that furstated I started trying really unorthodox methods to resolve the problem.
    I just started Itunes in compatibilty mode (Windows XP SP3) and for now it seems to be working without that annoying bug!
    Anybody know what that means?!

  • Does anyone has the same scrolling problem? My macbook air 13''(2010) running lion, when files in a folder arranged by kind, every scrolling paused for a second..?

    does anyone has the same scrolling problem? My macbook air 13''(2010) running lion, when files in a folder arranged by kind, every scrolling paused for a second..?

    does anyone has the same scrolling problem? My macbook air 13''(2010) running lion, when files in a folder arranged by kind, every scrolling paused for a second..?

  • Persistent Scrolling Problem

    I have a two-finger scrolling problem with my 5- day- old Macbook (10.5, Firefox latest version). It was suggested in this forum that I turn off Horizontal scrolling. I did that, in fact I think I tried every combination of settings on the
    Keyboard & Mouse page, but the scrolling is still erratic. It jumps and stalls and
    then (occasionally) works. This happens on line or in documents. I wish I could determine if this is a software or a hardware problem. If it is hardware I need to return this unit real quick. I've been everywhere on the net looking for a software fix or update, but all I have found are add ons that will probably lead to more problems. I don't want to go through the aggravation of a return if I can help it.
    I'd appreciate any suggestions. Thanks Bill
    Now the cursor is acting funny! I can't fix these lines above.

    ok, dude, dont treat my reply as answer, but im just suggesting..why dun u plug in a normal mouse for gaming anyway?
    1)clicking a lot kills the batteries, and also wear out the clicking mechanism.
    2)the scrolling is too sensitive on windows (my exp.) and it switches the weapon unexpectedly all the time (left 4 dead 2)
    3)as u said, its windows! mac hates PC, just think about it, they intentionally hold up the start up time for windows on boot camp, so what quality do u expect with all the mac hardware on WINDOWS??
    I personally plug in a different set of keyboard and mouse to play games on bootcamp, cos the keys are still confusing for me, and USB HIDs dont need batteries, be green!

  • 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

  • T43 Vertical Scrolling Problem (not just Firefox)- Any official response from Lenovo

    After searching the forum, i have not been able to find any response from Lenovo as to how to correct this problem.
    Incidentally, my "occasional" vertical scrolling problem occurs in any browser,  IE7, Firefox3, Opera9 (at least those 3) as well as Windows applications with a vertical scroll bar like Windows Explorer.
    This only started to occur very randomly around 6 months ago.  But as of late it is occuring more often.
    The only work-around
    http://blog.jonschneider.com/2008/03/workaround-th​inkpad-gets-into-always.html 
    might indicate that it is a possible hardware problem.
    However, I have to say that I rarely use the laptop scrolling buttons and 99.9% of the time, latetly, I use a Logitech laser USB mouse for scrolling purposes. 
    As another possible work-around (if you are using an external mouse) is to uncheck the enable virtual scrolling in the touchpad properties window. 
    I certainly hope it is not a hardware problem, as the warranty on my T43 ran out a long time ago.
    btw, I am running Windows XP Pro XP3.
    Moderator Note; added system type to subject
    Message Edited by andyP on 07-27-2009 09:32 PM

    Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    See [[Text Zoom]] and [[Page Zoom]] and http://kb.mozillazine.org/Zoom_text_of_web_pages

  • How do you fix a scrolling problem on Apple TV?

    When I click the remote once, it scrolls to end of row or column.  I've restarted via remote, unplugged (restarted), restored to factory default = still have scrolling problem.  Tried 2 different remotes, same problem with each.  Tried unparring then reparring = no joy.

    Update your Adobe Flash player: Adobe Flash Player 16.0.0.305.

  • Spark datagrid - Horizontal scroll won't work

    I have been unabled to get my full datagrid to scroll on a mobile device. I know they are not optimized for mobile but everything else seems to work ok.
    I have the scroll setting enabled: horizontalScrollPolicy="on"
    This still does not enable my grid to scroll even through the data is there and I can statically set the position and see the different position on the grid.
    The title bar scrolls then snaps back when I take my finger off the screen.
    Any suggestions?

    think many programs in windows support you clicking just beside the scroll arrow and drag out a split
    at least visual studio does that
    test with other apps to narrow it down to if it's excel causing it

  • Vertical Scrolling problem in Safari

    I'm currently having an odd vertical scrolling problem in Safari.  This issue is not reproduced in Chrome or Firefox.
    I've been able to reproduce this issue doing something very simple:
    I have a browser wide rectangle with a solid color.
    Beneath that I have a browser wide photo.  (Rectangle set to browser edges and then fit to fill with photo.)
    And beneath that I have another browser wide rectangle with a solid color.
    Then I scroll.
    Once the photo (the middle element) reaches the top of the screen I have shut the scrolling off so the photo will stay static. (Initial motion 1 / Final motion 0 set in the "Fill/Scroll" tab - and the key position is set so it stops at the top of the browser.)  As expected, the lowest box continues to scroll upwards and cover the static photo.
    This very simple effect is flawless in Preview mode, Chrome, and Firefox.
    Yet in Safari, the photo, once it reaches its resting spot, does stay static, but seems to jump and jitter all over the place while I continue scrolling and the below content covers it.  (In the other browsers it's super solid like a real static background.)
    I've read there are some parallax scrolling bugs in Safari Mavericks.  But I'm still in an older operating system using 10.8.5 and Safari 6.0.5.
    Any suggestions or work arounds on how to correct this? (Again, I'm controlling the scroll using the scroll tab found with "Fill". Should I also be using the one found under Scroll Effects?  What the best one to use? Although it does work in the other browsers… so…  maybe I'm not doing anything wrong and this really is a Safari problem.)
    Thanks you.

    Hi
    Please share the site url, I will have a look.
    Thanks,
    Sanjit

  • Mouse scrolling problem

    My iMac is around two years old, and I'm on my third mouse. Why? Because of the scrolling ball. The present mouse scrolls in all directions except down. But previous mouses have stopped scrolling in more than one direction. I have read articles (including the stuff from Apple Support), and I have, I think, tried just about everything (except take it apart, as one article instructed). The mice work fine for a while--then come the scrolling problems. I've tried rubbing the ball (mouse upside down) vigorously on a lint-free cloth, and I regularly (when problems inevitably arise) clean the ball with alcohol and a Q-tip. The latter does get the ball pretty clean, and it works for a while; but eventually even this doesn't correct the scrolling problem (as is the case right now). So, unless someone can give me a suggestion that might work (with Mighty Mouse), can anyone recommend a non-Apple mouse--something not too expensive but of good quality?
    Thank you,
    Carl Kalwaitis

    Hi Carl, I used mice (Mighty included) but always went back to the trackball. You don't move your wrist and it is very precise. I have had the same trackball for three years and my Mighty Mouse (which came with my new iMac) is still in it's original packaging. I have a Logitech Marble Mouse. It has all the scrolling and other functions that the MM has. Give it a try and save yourself some exasperation.
    M.

Maybe you are looking for

  • 37e200u No picture only sound

    After an apparent power drain that caused household lights to dim, the picture on my tv disappeared. The sound is still playing, but I cannot bring up any menus or anything. HELP!

  • Vbscript - detect config changes

    not sure if this is the right community to post this kind of question but i am after some example of vbscripts to detect routing change for example like to know when someone add a new route entry, advertised in to our campus networks, would like to k

  • How about setting default layer styles to 90 degrees by default?

    Who ever really uses 120 degrees for anything? If I could count the number of times I've had to change my layer styles to 90 or 180 from the junky 120, I'd reach a number which doesn't exist because it's so damn big. Fix this, or give users an option

  • SSL with oracle APEX

    Hi We ar trying to make a consumer protal where in a consumer after keying in his service number is given paytment details.As soon he presses the pay now URL is directed to bank. The payment deails are sent back to site. How certicfictaion and securi

  • IPhone gives an error 2005 ?

    when i try to restore my iphone 3GS to iOS 5, it gives an error 2005 in itunes, i even can`t turn on the phone, it is in DFU mode and when i exit DFU, it goes to recovery mode ! i tried many articles given on google website, but none of it worked My