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.

Similar Messages

  • 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

  • Need for a Datagrid with variableRowHeight="true" and custom Item Renderer to display exact rows

    Hi again, developers:
    I'm in a search of a datagrid  with certain characteristics:
         - variableRowHeight = "true"
         - only one column
         - each row must have a custom item renderer with possibly different heights, and a fixed width
         - the datagrid must show always every item in the data provider with no vertical scroll bars, what means that the datagrid height must have always the exact height sum of all the item renderers it is displaying.
         - and no extra empty rows must appear in the last positions of the datagrid
    The last two requirements are something difficult to achieve... for some reason, empty rows appear at the last positions of the datagrid. I post what i've managed to get:
    <mx:Script>
         <![CDATA[
         private function resize():void
                    if (dg.dataProvider)
                        var h:Number = dg.measureHeightOfItems( -1, dg.dataProvider.length);
                        dg.height = h;
         ]]>
    </mx:Script>
    <mx:DataGrid id="dg" width="530" horizontalCenter="0" verticalScrollPolicy="off"
            dataProvider="{dp}"
            wordWrap="true" variableRowHeight="true" showHeaders="false" dataChange="resize()" height="{dg.measureHeightOfItems(-1,dg.dataProvider.length)}" click="Alert.show(dg.rowCount.toString());">
            <mx:columns>
                <mx:DataGridColumn headerText="ID" width="50">
                    <mx:itemRenderer>
                        <mx:Component>
                            <mx:TextArea height="{Math.random()*100}" wordWrap="true" backgroundColor="{Math.random() * 16777216}" paddingTop="0" paddingBottom="0"/>
                        </mx:Component>
                    </mx:itemRenderer>
                </mx:DataGridColumn>
            </mx:columns>
        </mx:DataGrid>

    Thanks Harui, but it doesn't help. If the border is set it will help, but the very big problem is the empty rows that appear at the end of the datagrid... I can't find a way of measuring correctly the height of the itemRenderers!
    I'll update this thread if I manage to do it.

  • DataGrid when set variableRowHeight=true, the Image in the itemRenderer can't show up

    http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Live Docs_Book_Parts&file=cellrenderer_072_28.html
    the above is the flex example. I did my code almost same as
    this example. But I do different way in renderer code.
    The example:
    <?xml version="1.0"?>
    <mx:HBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    horizontalAlign="center" >
    <mx:Image id="albumImage" height="175"
    source="{data.Cover}"/>
    </mx:HBox>
    My code:
    <?xml version="1.0"?>
    <mx:VBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    dataChange="init();">
    <mx:Script>
    <![CDATA[
    public function init():void{
    releasedBox.removeAllChildren();
    if(data.releasedImage){
    var hbox:HBox = new HBox();
    var img:Image = new Image();
    var lbl:Label = new Label();
    img..source = data.Image;
    lbl.text = data.Revision;
    hbox.addChild(img);
    hbox.addChild(lbl);
    releasedBox.addChild(hbox);
    ]]>
    </mx:Script>
    <mx:HBox id="releasedBox">
    </mx:HBox>
    </mx:VBox>
    The different is I add my image in AS code but not in mxml
    code. And the problem is when I set variableRowHeight=true, the
    datagrid can display my label, but image can’t display. And
    when mouse over, the data line is blinking. When you click one
    line, there can show the image for 1 sec.
    If I set variableRowHeight=false. It works fine.
    Anyone knows what’s this problem? Thanks

    Check in the Store menu at the top of your iTunes application on the computer rather than visiting the iTunes Store..

  • Spark Datagrid - Show all rows using requestedRowCount & variableRowHeight=true

    I have a Spark Datagrid that has variableRowHeight=true. I also have the requestedRowCount set to the length of the dataProvider. So, in theory the rows shown should be the same number in the dataprovider(Arraycollection). However, the problem is that due to having variableRowHeight=true and some rows being multiline,  in some instances, all of the rows are not getting shown. 
    Suggestions on how I can fix this issue?
    Thanks, in advance.

    Does anyone have a solution for this? I have exactly the same problem.
    Datagrid with requestedRowCount="-1" and variableRowHeight="true"
    No issue with autoexpanding the grid - and no issue with autoexpanding the row height with word-wrapped text.
    But when combined - a grid that has 5 elements in dataprovider will only show 3 - if one row has been expanded to handle the word-wrapped data.
    Is it possible to count the rowheights and override the measure function with minheight or measuredminheight?
    Or do I need to call something other than invalidateDisplayList after dataprovider changes?
    Any suggestions or sample code would be welcomed.

  • 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

  • How can I get the panelTabbed to have a scroll bar when needed?

    I have a panelTabbed with4 tabs and I want a scrollbar to appear when I shrink the size of the page down. I discovered that the tabs dissappear and there is not way to access them during some accessibility testing.
    I tried inserting a panelGrouLayout around the paf:panelTabbed, but it did not help
    <af:panelHeader id="ph3" text="#{acrResBundle['Header.Reports']}">
    <af:panelGroupLayout id="pgl1" layout="scroll">
    <af:panelTabbed id="panelTabbed1" styleClass="AFStretchWidth"
    childCreation="lazy" inlineStyle="height:410px">
    <af:showDetailItem disclosed="true" id="showDetailItem1"
    stretchChildren="first"
    text="#{resBundle['Header.TopPredictors']}">
    <af:panelGroupLayout id="pgl3" layout="scroll">
    <af:region id="TopDr1"
    value="#{bindings.TopDriversRegion1.regionModel}"/>
    </af:panelGroupLayout>
    </af:showDetailItem>
    Also, the outer page, which uses fnd:applicationsPanel with scroll="true", that the above is embedded in does get a scroll bar when needed by other af:panelHeader sections of the page.

    Looks like the problem only occurs in screenReader mode, i.e., the ">>" link does not show up at all in screenReader mode, but does show up when not using screenReader mode. I filed bug 10407797
    Edited by: klaus gross on Dec 16, 2010 3:21 PM

  • 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.

  • Printdatagrid variableRowHeight="true" and multipage

    Hi All,
    I've been searching for a fix or workaround to what seems to be a long time bug with printing.
    When my PrintDataGrid is set to have variableRowHeight="true" wordWrap="true" and there is a need for multipage, the last row is cut off.
    This basically means that I cannot print properly a DG that contains text wrapping in certain rows.
    I've seen posts as far back as 2007 about this, I would have assumed that this would of been fixed, but it seems that the problem is still lurking.
    Anyone have a solution for this?
    Thank-you in advance, I appreciate it.

    Hi there,
    I found this bug report with some workarounds that don't really always work:
    https://bugs.adobe.com/jira/browse/SDK-14174
    thank-you!

  • 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 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.

  • How can I prevent Magic Mouse from scrolling horizontally when I don't want it to?

    I recently purchased a Magic Mouse to go with OS 10.6 Snow Leopard. It's a great mouse but it causes 2 problems:
    If I leave it on "Scroll with interia" in System Preferences/Mouse, it scrolls horizontally when I don't want it to.  Since I mostly work in Word documents, I often lose my place in the document this way. On the other hand, checking "Scroll without inertia" makes vertical scrolling, which I do all the time, a lot harder.
    The mouse seems to cause what I think of as "fractures" in Word documents--words and parts of sentences will disappear or get crunched together , then reappear when I select the place where they vanished.  They also reappear if I scroll vertically to get the problem area off the screen and then return to it. This wastes a lot of time at best; at worst, I'm afraid I'll lose work.  The problem occurred once in a while with a Logitech bluetooth mouse I was using, but not as bad and not all the time.
    I love the mouse's ergonomics and would like to keep it, but if I can't solve this problem, I'll have to return it.  Would be very, very grateful for any tips!  Thanks.

    Always nervous about recommending sites I have no personal experience of.  On the plus side it doesn't relate to any of the bad sites I am familiar with and it appears to be the developer's site ... but there is no contact point for you to ask questions.  You said in your initial post it was to go with Snow Leopard but this version says it is meant for 10.7 and above.   Did you notice that?   I also notice several other references to Word and mouse and one person found the solution lay in the updating of word 2011 to its highest level.   I can offer no more.

  • Can't parse WSDL when useProxy=true

    Hello everyone.
    I'm using Flex since 1.5 and now try to migrate Flex2.0.
    Most of our application need to access data via WebService,
    and we use <mx:WebService> tag to access them.
    In our Flex1.5 environment, we also use Proxy service of Flex
    (with specifying useProxy=true), and it works fine.
    But in Flex2.0, our mxml application can't parse the same
    WSDL when useProxy=true!
    On the other hand, our application can parse correctly when
    not using proxy service. (useProxy=false and set crossdomain.xml on
    the root of datasource Web server.)
    I'was so confusing that I captured HTTP traffic between
    client application and server( both FlexDataService and Data source
    Web Server), with ServiceCapture.
    When useProxy=true, at first, client application sent request
    to Flex Data Service to get not only calling the SOAP operations
    but also calling WSDL itself. After that, Flex Data Service
    returned the response message as WSDL data, and I found the WSDL
    data was broken.
    When useProxy=false, of cource, the WSDL was passed
    datasource Web Server correctly and application could parse it
    without problem.
    These parse error depends on the WebService.
    I wonder this is some bug of Flex Data Service or not.......

    Hello, everyone.
    After that, I tried to change the encoding of WSDL, which was
    broken when useProxy=true, from UTF-16 to UTF-8.
    And I could get correct WSDL data from Flex Data Service's
    proxy.....
    It seems when the encoding of WSDL is UTF-16, the parse is
    failed, but I'm not sure this problem is happened commonly and this
    is some of the bug of Flex Data Services.

  • I have a Belkin bluetooth keyboard attached to my Ipad 3. I would like to know if there is any way to have the arrow keys scroll down when browsing web pages?

    I just got my Ipad 3rd generation a few days ago and for my case I got the bulky BELKIN Bluetooth keyboard. I notice that when I press down the arrow keys it does not seem to scroll down when searching a web browser or looking up web pages. However it works fine when scrolling down on office apps such as Pages. I'm wondering if is there a way to make the arrow keys on the keyboard scroll down when on an internet web page like my Mac does.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of the test.

  • Af:table sorting when immediate='true' bug

    Where can I find the patch to fix the problem of sorting an af:table when immediate='true'?

    No I don't have a bug number, I've found that this is a bug based on this thread <a href src='BUG:  ADF FACES 10.1.3_04: Table sort broken if immediate="true" but I have no idea what the number is or where to find the patch for it.
    This is a really irritating bug. I want to have sorting on my tables but if I can't put immediate='true' on the table then other components on the page will fire their validation.

Maybe you are looking for

  • Filtering report data based on user login and Parameter fields

    Post Author: mronquillo CA Forum: General Hi,I am running a report that filters data based on the user login. To do this, I created a formula called @user that compares the login name (using the CurrentCEUserName field) and returns the user's name. I

  • T61 Cut off in middle of working and will not come back on

    I have a T61p that was working fine, then just cut off.   It was plugged into power outlet.  It will not come back on, or display any lights.  I have tried the 10 power button pushes, last for 30 secs several times now and it does not have an effect.

  • Using a Temporary Variable in PCR

    Hi All Please suggest for the following. How can I use a temporary variable in a PCR. Say if I need to transfer the AMT of WT 4100 to a variable like 'XYZ=4100' in PCR.....What variable I can use and what is the correct syntex for this. And how can I

  • Startup Problem & "Zapping the Pram"

    Okay, I'm having startup problems, and I did the Command/Option/P/R startup. Next, I know that Command S, or Option S, something like that should take me to a startup equivilant of Disk Utility. It's been so long, I forgot what to do. I searched but

  • Multiple Topics/Queue for Single MDB?

    Hi - Is it possible to configure single MDB to handle multiple Topic/Queue in JMS? I used two <jndi-name/> tags for two topics, but only the first one got picked up by the AS7 server. If one MDB can be configured to take multiple topics, how should I