Datagrid Scrolling

Hi,
I have a datagrid which allow scrolling, but I have also added a colour background based on the cell value however this does not work, i.e. when scrolling the cell colours remain even though the cell background colour should not be.
Thanks for any advice.

Hi ,
Is it possible for you to share just the code snippet which deals with the color change for the datagrid ? We will investigate this at our end and get back to you.
Thanks and regards,
Sudeshna Sarkar
Adobe Flash Professional Team

Similar Messages

  • Datagrid scrolls on change or click event - why?

    Hi,
    How do I stop my datagrid scrolling one line when I click on the top row?
    This happens with change, itemClick, and itemDoubleClick.
    It does not scroll on rows other than the top row.
    private function columnClick(e.ListEvent):void
    if e.columnIndex==0)
    DataGrid id= "dg" change="columnClick(event)"
    Any help would be much appeciated.
    Ian.

    You can only accept invitations and send invitations from the Calendar app, with an MS Exchange account on the iPhone.

  • Datagrid scrolling madness

    Hi all.
    I am trying to get a container to scroll when a datagrid is
    scrolled.
    Is there any easy way to do this.
    I am aware of the h and v scrollposition properties but the
    difference in how the datagrid scrolls causes the two items to
    scroll out of synch.
    Any help is greatly appreciatted

    Hi, you can do this by percentage. Here's an example
    (right-click to view source):
    http://www.anaheimjobs.net/samples/linkscroll/
    Hope you find it useful.

  • Datagrid scroll problem

    Hi guys,
    I know this question's been asked before, but none of the
    solutions work for me. Here's the situation...
    I'm updating a datagrid regularly, and then setting it's
    vertical scroll position = max vertical scroll position. Which is
    fine for the most part.
    However, when rows are more that one line long, it messes up,
    and never shows the whole of the last row.
    I've tried calling datagrid.validateNow(); before I do the
    position setting, and also tried setting an updateComplete event
    that will run the position update in a callLater();
    Any ideas for other things to try?
    Thanks!

    With DataGrid, the verticalScrollPosition can use the row
    index. So try:
    dg.verticalScrollPosition = dg.dataProvider.length;
    Or something close to that.
    Tracy

  • Datagrid scrolling problem

    I'm trying to create a contact search/selection component
    that works somewhat like a combobox (more like SuperComboBox
    http://blog.strikefish.com/blog/index.cfm/2008/3/21/Flex-Smart-Combo-aka-look-ahead-combo
    See sample at
    http://www.eval.rmc.psu.edu/dgt/DataGridTest.html
    Source view is enabled.
    Basically, after the user types a few characters of the last
    name, a datagrid (separate component) is popped up and presents a
    list of matching contacts. The component includes view edit add
    buttons, too (which are not active in the included example).
    This all works great except for a couple of problems with the
    popped up datagrid. I've tried both the standard and advanced dg's
    and the both act the same.
    If the number of rows returned exceeds the area of the
    datagrid (12 rows in the example), the datagrid, as expected,
    displays a vertical scroll bar. The scrollbar/datagrid doesn't work
    properly at that point, though. Clicking the down arrow or in the
    scrollbar track or the down arrow DOES NOT scroll the data.
    Grabbing the slider bar and dragging it down DOES scroll the data
    down. However, when I do scroll down using the slider, clicking on
    a row does not fire the itemClick event, and the grid scrolls up to
    the first 12 lines and highlights a row in the first 12 rows. CLICK
    does get fired but always returns a row between 1 and 12.
    Now, ideally, the user is going to type 3 or 4 characters of
    the last name and zero right in on the contact they're looking for
    without the need for scrolling, but there are always the outliers
    like 'Smith' that return a large number hits (the example uses PA
    Legislators offices, so it's not quite representative of the
    end-use data set). Regardless, the datagrid object doesn't appear
    to work correctly when it's a component -- I'm not sure if it's a
    bona fide bug, or the whether it's that the grid is a component,
    contained in a canvas, or being popped up that's the problem. More
    likely, my flex newbie self just doesn't have some vital attribute
    set correctly, or I'm doing something else that's not correct.
    Any insights would be greatly appreciated.
    Thanks,
    want-a-dw
    Sample code included.
    Windows XP SP2
    Flex Builder 3.0.205647
    Same results with these browsers/player versions.
    Firefox 2.0.0.17, Flash Player 9.0.124.0 (and 9.0.115.0)
    IE 6.0.2900.2180, Flash Player 9.0.124.0 (and 9.0.115.0)
    Chrome 0.2.149.30, Flash Player 9.0.124.0

    > That is definitely incorrect behavior.
    > Does this happen in a simple test app? I think I have an
    example I can try with, I will post back what I find.
    Yes. There is an example of the behavior at
    http://www.eval.rmc.psu.edu/dgt/DataGridTest.html
    and source code view is enabled. Thanks for your help.

  • Datagrid scrolling problem when different items are in the same column

    I have a datagrid which I am populating with different items (LinkButtons, Images, Labels). However when there are different types of items in the same column and when i try to scroll everything gets messed up (Images get overlapped with each other or the labels get overlapped with images).
    I am overloading the "IDropInListItemRenderer" to create different types of items in each cell and I am overloding the "updateDisplayList" function
    Any ideas as to why the items get messed up during scrolling? Is there some other preperty of IDropInListItemRenderer that should be overloaded?

    Hi Subeesh Arakkan,
    Thanks. This is the exact problem that I have. Althought my overloaded functions are a little different and Im trying to resolve it. But htis is a good lead.
    Thanks,
    Prashanth

  • DataGrid scroll positions resetting with dynamic dataprovider

    Hi - I have a DataGrid that is backed by an ArrayCollection
    that is fairly dynamic. Before doing my updates, i disable
    autoupdating, and though my size is typically fixed at 100 items,
    sometimes those items will be replaced. My problem is that a user
    who has scrolled down the visible grid, will lose their scroll
    position when i replace items. If i'm just doing updates on the
    existing objects, it's fine, but the replace is causing the scrolls
    (both horizontal and vertical) to reset. I've tried to isolate
    where this is happening (whether set verticalScrollPosition or on
    the bookmark) and i can't quite find it.
    Anyone know how i can prevent this behavior? I've tried
    capturing the scoll position before i begin my updates, and then
    setting it back when finished, but it doesn't work.
    Thanks.
    ./paul

    Actually, I spoke too soon. I had a number of things I was
    trying. And when i tried to clean up the other things that I
    believed were extraneous (including an override of
    makeColumnsAndRows), the vertical scroll resetting stopped working.
    I've spent about 90 minutes trying to get back to where I was (wish
    the builder was in IntelliJ!).
    When it was working, I also tried to add horizontal scroll
    capturing, and that didn't seem work either. I have 34 columns, the
    first one is locked. When I captured my position, I saw it was 11.
    Then i performed the update, and callLater my resetScroll position.
    The first column i saw after the locked column is correct. However,
    the scroll bar itself is fully left. On the next update I captured
    a horizontal scroll of zero.
    ./paul

  • DataGrid scrolling issue

    Hi again,
    Using Beta 3. I've got a datagrid control with a series of
    data elements on it. When the user selects an item in the grid, I
    have a canvas that I show over the bottom third of the grid that
    gives details about the selected item. The problem is that I would
    like the selected grid item to become the first
    visible item in the grid. This is especially important in
    those instances where the user selects an item that is in the
    bottom third of the grid and which gets covered by the canvas when
    they select that item.
    So, is there any way to force scrolling of a DataGrid?
    Thanks, Jim

    Unfortunately, that doesn't work. According to help, "The
    offset into the content from the top edge." It doesn't really have
    anything to do with the selectedItem. Any other ideas?
    Thanks, Jim

  • DataGrid scroll bar problem

    Hi all,
    My datagrid is edit mode, only for edit without selectable.
    But when I click on the scroll bar, it would auto select the row in
    scrolling position. And the cell focus would auto stay in the
    selected row first column. Anyone has idea to solve it? Is the
    datagrid has some setting need to be changed?
    Thanks

    I don't know if I understand the problem correctly.
    If you want the data to be sorted only on startup you should disable sorting (sortableColumns = false) and sort it manually upon initialization. Then, when you change a value of a combobox in a row, no sorting will occur.
    Does this help?
    Dany

  • Datagrid scrolls unnecessarily when variableRowHeight=true

    I have a custom component that includes a DataGrid component.  I want to set variableRowHeight to true to avoid truncating data within a cell.  When I do, the dataGrid shows only so many rows then the user must scroll to see the rest even though there is room in the container the dataGrid could use.  It appears that the measured height of the dataGrid does not include the extra height required by the rows of variable height causing the scrollbars to appear unnecessarily.
    I am doing this with the mxml shown below
    I am using a custom skin to remove the column header
    I am not using an itemRenderer and can't seem to get that to work
    <s:DataGrid  id="contentDataGrid" dataProvider="{transposedDP}" skinClass="widgets.Query.QueryDGHeaderSkin" resizableColumns="false" variableRowHeight="true" width="100%"> <s:columns> <s:ArrayList>
    <s:GridColumn dataField="Value"/> </s:ArrayList> </s:columns> </s:DataGrid> <s:GridColumn dataField="Property"/>

    This is a common problem.  Word-wrapping text can be in any dimension so you usually need to set the width of the text widgets accurately otherwise they will report some other height.

  • Spark DataGrid scrolling performance problems with debugger

    So, i have a DataGrid using the latest SDK (4.5.1) with 500 rows of data and 14 columns.  I'm not using any custom ItemRenderers at all; the data is just string and number properties of each data object in an ArrayCollection. When I try to scroll vertically, either by clicking on the scrollbar handle and dragging or by using the arrow buttons, the performance degrades so badly that the application appears to freeze up completely for a few seconds. (I'm on OS X, and I see the spinning beachball icon.)  The app then remains so unresponsive as to be pretty much unusable.
    The exception to this is when, rather than launching the app as a debug configuration, I just refresh the page so the swf can run without the debugger attached. Detached from the debugger, the performance is great, every time.  This is, BTW, using the very latest build of Flash Builder 4.5 Pro; I just installed it last week.
    I've tried eliminating various possible causes, and haven't had any luck. I made the data non-bindable, removed all the custom skins and css styling, and even removed event listeners from the DataGrid; none if it seems to make a difference. 
    Has anyone else noticed this issue?  Is there a workaround?  If the debugger is to blame (which seems likely), is there some setting that I can turn on or off that will help?
    Thanks!
    Michael

    Hi Michael!
    Few days ago I've had the same issue.
    My configuration:
    Windows 2008 server (i'm working on remote desktop)
    Flex SDK 4.5.1
    Firefox 8.0 (on Explorer was ok).
    Flashplayer version 10.2.153.1
    It happened to me only that day (run without debugger, restart application didn't work), but it seems that when I log out from Windows and log in again the problem disappeared.
    Best regards
    Tom

  • Datagrid Scrolling Problem.. Does not fit into Parent Container..

    Hi All,
           I have a module and module contains only one datagrid. I am adding this module to tab navigator dynamically in the next index. I am using Text as Item renderer in the datagrid and the row height will change depending upon the data diplyed on the Text. When the data populate in datagrid the datagrid going beyond the containers layout. i.e height is not fit into parent container. I am using Canvas as parent container .. Please find the below attached pictures and you will get to know what is my problem?
    Please help me to get out from this issue.. It is urgent..

    Thanks for quick reply
                   Here I am adding this module to canvas and the canvas is also dynamic . As you said "customize the measure() method in Text control and return the correct measuredHeight based on the explicitWidth."  what is the relation between Text control height and datagrid? Datagird should take it's parent container width and heights.  I am newbie to this Flex.. can you please explain it briefly. And if you have any Other way to do this please tell me .. it is very helpful to me.. Can you please post cusomized measure method if possible. please

  • Datagrid scroll postition problem

    Hi, I'm using a datagrid which is bound to a dataprovider
    that updates regularly (with additional rows) I'm wondering why
    this isn't causing the last row to be visible after I've updated
    the provider...
    datagrid1.verticalScrollPosition = maxScrollPosition;
    Any ideas what i can do to fix this?

    My guess is that when the dataProvider is updated with new
    items the maxScrollPosition is not yet updated to the new value.
    validateNow brings DG upto date so that it is in a complete valid
    state and hence it works.

  • 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

  • My datagrid refuses to scroll (newbie)

    While working on a AIR project, I have created a several datagrids which will not scroll vertically. When the dataprovider is a hard-coded array, they work, but then when I bind to an array that results from a SQLLite SELECT statement, the data is displayed just fine, but the datagrid won't scroll beyond the visible rows.
    When I drag the scrollbar handle down, it pops back up to the top as soon as I release the mouse button. If I hold the mouse button down on the bottom scroll bar arrow, it flickers (it scrolls down a row and pops back up to the top within a few milliseconds). If I position the mouse pointer inside the list and flick the mouse scroll wheel very quickly, it will scroll down a few rows. As soon as I move the mouse pointer over the scroll bar, the list goes back to the top again.
    Has anybody seen this kind of behavior before?
    Code for datagrid and the panel that contains it:
    <s:Panel x="483" y="372"     width="
    200" height="238"     title="
    Commonly Used Buyer(s)"     fontSize="
    14">
         <mx:DataGrid x="10" y="15"          dataProvider="
    {buyerCollection}"          fontSize="
    12" fontWeight="bold"          width="
    178" height="100">
              <mx:columns>
                   <mx:DataGridColumn headerText="Buyer Name" dataField="BUYE_NAME"/>
              </mx:columns>
         </mx:DataGrid>
    </s:Panel>

    I figured it out!
    The problem was caused by me calling the data retrieval functions from the render event of a component. I did this because the component is only visible when the user switches to a certain application state. The component contains many datagrids and other bound controls, so I didn't want to retrieve data into its controls unless the user chose to switch to that state. Unfortunately, it seems that the render event fires over and over again. In fact, I suspect that it re-fired whenever data was displayed in the controls, so an endless loop was occurring.
    I have moved the retrieval logic to the application itself. This solved my datagrid scrolling problem. Unfortunately, this adds overhead and prevents me from achieving my original goal of loading the data only when the state is changed.
    If anyone has a suggestion for a good way to load data on state change, I would be interested. I suppose that I could put back it on the render event and set a "dataLoaded" flag variable to true after loading. On the render event, I would only load the data if the variable was false. I'm sure there's a better event or technique out there.
    Many thanks to all those who responded. The suggestions that an event was firing repeatedly certainly pointed me in the right direction!

Maybe you are looking for