Datagrid smooth scrolling.. Don't want default row jump behaviour..

Hi All,
      I am displaying large amount of data and each row contains itemrenderer Text. and this Text control displays large amount of data with in that... Whats the problem here is When we scroll vertically it goes jump into another row with showing total data.. I think this is a default property of datagrid. I just want avoid that and I need smooth scrolling of rows.. Can any one have any ideas about this.. any help can appriciable..
Thanks
Ram

Hi Alex,
       That was great job. You have implemented smooth scrolling for List..  Based upon that I have implemented the same in datagrid also..But I am facing couple of issues...
    1.  I have Item renderer Text.. With in that text I am displaying almost 90 records and it has a huge height. Accordingly the row height must change .. But what happend in my case is the data is overlapped on the second row.. the row height changes to certain height. after that it is not expanding.. records are displaying and overlapped on the second row and if it still lengthy it displayed on the third row also... so How can I solve this issue.. The row height must vary with the itemrenderer..
2. Second one is If I scroll vertically it is scrolling smoothly fine. But If I release the mouse the scroller going to Row end position or row starting position..
        I just want to fix the scroller position where user releases the Mouse from the vertical scrollbar...
      Can you please help me on this .. It is urgent  ..... I am posting my Datagrid code here...
package view.components.grid
    import flash.display.DisplayObject;
    import flash.events.Event;
    import mx.controls.Alert;
    import mx.controls.DataGrid;
    import mx.events.ScrollEvent;
    import mx.events.ScrollEventDetail;
    public class CustomGrid extends DataGrid
        private var fudge:Number;
        public function CustomGrid()
            super();
            offscreenExtraRowsOrColumns = 2;
        override protected function configureScrollBars():void
            super.configureScrollBars();
            if (verticalScrollBar)
                verticalScrollBar.lineScrollSize = .125;  // should be inverse power of 2
        override public function get verticalScrollPosition():Number
            //Alert.show("You are in vertical scroll Position handler");       
            if(!isNaN(fudge))
                var vsp:Number = super.verticalScrollPosition + fudge;
                fudge = NaN;
                return vsp;
            return Math.floor(super.verticalScrollPosition);
        override protected function scrollHandler(event:Event):void
            // going backward is trickier.  When you cross from, for instance 2.1 to 1.9, you need to convince
            // the superclass that it is going from 2 to 1 so the delta is -1 and not -.2.
            // we do this by adding a fudge factor to the first return from verticalScrollPosition
            // which is used by the superclass logic.
            var last:Number = super.verticalScrollPosition;
            var vsp:Number = verticalScrollBar.scrollPosition;
            if (vsp < last)
                if (last != Math.floor(last) || vsp != Math.floor(vsp))
                    if (Math.floor(vsp) < Math.floor(last))
                        fudge = Math.floor(last) - Math.floor(verticalScrollBar.scrollPosition);
                        trace(last.toFixed(2), vsp.toFixed(2), fudge);
            super.scrollHandler(event);
            var pos:Number = super.verticalScrollPosition;
            // if we get a THUMB_TRACK, then we need to calculate the position
            // because it gets rounded to an int by the ScrollThumb code, and
            // we want fractional values.
            if (event is ScrollEvent)
                var se:ScrollEvent = ScrollEvent(event);
                if (se.detail == ScrollEventDetail.THUMB_TRACK)
                    if (verticalScrollBar.numChildren == 4)
                        var downArrow:DisplayObject = verticalScrollBar.getChildAt(3);
                        var thumb:DisplayObject = verticalScrollBar.getChildAt(2);
                        pos = (thumb.y - downArrow.height) / (downArrow.y - thumb.height - downArrow.height) * maxVerticalScrollPosition;
                        // round to nearest lineScrollSize;
                        pos /= verticalScrollBar.lineScrollSize;
                        pos = Math.round(pos);
                        pos *= verticalScrollBar.lineScrollSize;
                        //trace("faked", pos);
            var fraction:Number = pos - verticalScrollPosition;
            fraction *= rowHeight;
            //trace("was", listContent.y.toFixed(2));
            listContent.move(listContent.x, viewMetrics.top + listContent.topOffset - fraction);
            //trace("now", listContent.y.toFixed(2), fraction.toFixed(2), listItems[0][0].data.lastName);

Similar Messages

  • Datagrid smooth scrolling...

    Hi Alex/ All,
           That  was great job. You have implemented smooth scrolling for List..  Based  upon that I have implemented the same in datagrid also..But I am facing  couple of issues...
        1.  I have Item renderer Text..  With in that text I am displaying almost 90 records and it has a huge  height. Accordingly the row height must change .. But what happend in my  case is the data is overlapped on the second row.. the row height  changes to certain height. after that it is not expanding.. records are  displaying and overlapped on the second row and if it still lengthy it  displayed on the third row also... so How can I solve this issue.. The  row height must vary with the itemrenderer..
    2. Second  one is If I scroll vertically it is scrolling smoothly fine. But If I  release the mouse the scroller going to Row end position or row starting  position..
            I just want to fix the scroller position where user releases the Mouse from the vertical scrollbar...
          Can you please help me on this .. It is urgent  ..... I am posting my Datagrid code here...
    package view.components.grid
        import flash.display.DisplayObject;
        import flash.events.Event;
        import mx.controls.Alert;
        import mx.controls.DataGrid;
        import mx.events.ScrollEvent;
        import mx.events.ScrollEventDetail;
        public class CustomGrid extends DataGrid
            private var fudge:Number;
            public function CustomGrid()
                super();
                offscreenExtraRowsOrColumns = 2;
            override protected function configureScrollBars():void
                super.configureScrollBars();
                if (verticalScrollBar)
                    verticalScrollBar.lineScrollSize = .125;  // should be inverse power of 2
            override public function get verticalScrollPosition():Number
                //Alert.show("You are in vertical scroll Position handler");       
                if(!isNaN(fudge))
                    var vsp:Number = super.verticalScrollPosition + fudge;
                    fudge = NaN;
                    return vsp;
                return Math.floor(super.verticalScrollPosition);
            override protected function scrollHandler(event:Event):void
                // going backward is trickier.  When you cross from, for instance 2.1 to 1.9, you need to convince
                // the superclass that it is going from 2 to 1 so the delta is -1 and not -.2.
                // we do this by adding a fudge factor to the first return from verticalScrollPosition
                // which is used by the superclass logic.
                var last:Number = super.verticalScrollPosition;
                var vsp:Number = verticalScrollBar.scrollPosition;
                if (vsp < last)
                    if (last != Math.floor(last) || vsp != Math.floor(vsp))
                        if (Math.floor(vsp) < Math.floor(last))
                            fudge = Math.floor(last) - Math.floor(verticalScrollBar.scrollPosition);
                            trace(last.toFixed(2), vsp.toFixed(2), fudge);
                super.scrollHandler(event);
                var pos:Number = super.verticalScrollPosition;
                // if we get a THUMB_TRACK, then we need to calculate the position
                // because it gets rounded to an int by the ScrollThumb code, and
                // we want fractional values.
                if (event is ScrollEvent)
                    var se:ScrollEvent = ScrollEvent(event);
                    if (se.detail == ScrollEventDetail.THUMB_TRACK)
                        if (verticalScrollBar.numChildren == 4)
                            var downArrow:DisplayObject = verticalScrollBar.getChildAt(3);
                            var thumb:DisplayObject = verticalScrollBar.getChildAt(2);
                             pos = (thumb.y - downArrow.height) / (downArrow.y - thumb.height -  downArrow.height) * maxVerticalScrollPosition;
                            // round to nearest lineScrollSize;
                            pos /= verticalScrollBar.lineScrollSize;
                            pos = Math.round(pos);
                            pos *= verticalScrollBar.lineScrollSize;
                            //trace("faked", pos);
                var fraction:Number = pos - verticalScrollPosition;
                fraction *= rowHeight;
                //trace("was", listContent.y.toFixed(2));
                listContent.move(listContent.x, viewMetrics.top + listContent.topOffset - fraction);
                //trace("now", listContent.y.toFixed(2), fraction.toFixed(2), listItems[0][0].data.lastName);
    Thanks
    Ram

    Renderers must report a correct measuredHeight based on a given
    explicitWidth.  You may need to override measure() method.
    If the rows are so tall they don't fully fit in the DG, there may not be a
    simple solution for MX DataGrid The Spark DataGrid should be able to handle
    it

  • Don't want default buttons to appear....

    Greetings -
    Does anyone have a way to not show a default button on a menu - I'd like the menu to appear with nothing activated on any button until the user rolls over.
    Much thanks in advance.
    Best,
    Josh

    Rollovers in the flash/director ect sense not really supported in DVD
    http://discussions.apple.com/thread.jspa?messageID=1553346&#1553346
    You can make a default button that does nothing and is not highlighted so people will have a "non" button when navigating and when they navogate to the other buttons they can highlight

  • Smooth Scrolling has stopped in Google search but only Google search, how can I fix, thanks

    There are scrolling 2 modes in Google search as far as I know one which I have always used which is smooth scrolling and the other where it jumps to the next site individually. Somehow after an update or something Google search on Firefox has stopped smooth scrolling. I also use safari and google search still smooth scrolls there.
    Anyway in advanced smooth scrolling is checked.
    If you are able to help please let me know.
    Thanks

    Hi 1ermintrude1,
    Please try to forget the site by going to the page about:permissions and clicking "Forget this site" as well as please Reset Firefox.
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information. <br>
    '''Note''': ''This will cause you to lose any Extensions and some Preferences.''
    *Open websites will not be saved in Firefox versions lower than 25.
    To Reset Firefox do the following:
    '''For Firefox versions previous to 29.0:'''
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox"[[Image:Button reset]] button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    '''For Firefox 29.0 and above:'''
    #Click the menu button [[Image:New Fx Menu]], click help [[Image:Help-29]] and select ''Troubleshooting Information''.Now, a new tab containing your troubleshooting information should open.
    #At the top right corner of the page, you should see a button that says "Reset Firefox"[[Image:Button reset]]. Click on it.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!
    Thank you.

  • Hyperlinks/anchors in smooth scrolling pages

    Is it possible to create hyperlinks or anchors within a smooth scrolling document so the user can jump from one point to another within the page?
    Thanks!

    Not within the page, no. You would need to use HTML for that.

  • Firefox 4.0 is clunky with big ugly buttons. It looks bulky and busy. How do I keep 4.0 but with the look of the previous version? I have the default look and I don't want to add any backgrounds or any themes.

    How do I streamline all the 4.0 features, but without adding any skins, themes or backgrounds? Basically I want to keep the default of the previous Firefox version as this new 4.0 is ugly and bulky and it does not make for smooth navigation. I don't want to add any customizations that will slow down my computer so I want it like the previous version. I would rather try to correct this than go back to a previous version. Thanks.

    Thanks for the article. I've done some of the suggestions but it is still not the same....Does anyone else miss the status bar? Even with installing the add on for it, it did not work for me. Overall, the article suggestions made a definite improvement. What was Mozilla thinking with this version? But thanks for pointing me to that article!

  • Smooth scrolling in mx:Datagrid

    Hi All,
    I am implementing a datagrid in my extension for Illustrator CS5, 6. I want to have smooth scrolling in it as there are images that are displayed in the grid. I am using an ItemRenderer for displaying images. It has one column. I searched the net and came across this blog by Alex Harui.
    This example is for List. I wanted it for datagrid. I overrode my datagrid scrollhandler and placed the code from the above example. Everything works fine except the up scroll. If I drag the scroll bar up/down, it works fine. If I scroll down by mouse clicks, it works fine. But, if I scroll up by mouse clicks, the scroll bar scrolls fine, but the grid view isn't updated. The grid view just repeats the images like in a loop. I am unable to understand.
    Can anyone guide me?
    Thanks!

    I changed the item renderer to just include label. But still no change, the up scroll is just not working. Can anyone guide me here? I am stuck.
    Thanks!

  • When I try to open an image by double clicking on it in Bridge, I get a message telling me to log in to Creative Cloud.  I am running CS6, and the default should be to open files in Photoshop 6 or in Adobe Raw (if it's a Raw file).  I don't want to log in

    When I try to open an image by double clicking on it in Bridge, I get a message telling me to log in to Creative Cloud.  I am running CS6, and the default should be to open files in Photoshop 6 or in Adobe Raw (if it's a Raw file).  I don't want to log into CC since I am not a subscriber, and this means that I have to work around, and go  back to Bridge, and tell it to open the file in Adobe RAW.  However, this does not work for older psd files which for some reason cannot be opened in RAW.  How do I return to the process of simply allowing RAW files to open automatically in Adobe RAW, and simply right clicking on the image in Bridge to bring up the option of opening it in Photoshop?

    <moved from Adobe Creative Cloud to Bridge General Discussion>

  • Is there a way to change the master text length in FCP? The default length is 10 seconds, which is too long. I can easily adjust the length but I don't want to do it each time, and I don't want to adjust one and then have to copy and paste this length.

    Is there a way to change the master text length in FCP? The default length is 10 seconds, which is too long. I can easily adjust the length but I don't want to do it each time, and I don't want to adjust a text clip and then have to copy and paste this each time. Ideally, there should be something in User Preferences but there is not. Thanks.

    Maybe some one else can pipe up with a solution, but this would literally take 2 seconds to do for a new project.  And you can create a "template project" that includes this "text" clip.  Save this project and then to a get info and check "stationary pad."  When you double click on this file, fcp will open with a copy of this project and you just need to do a save as. 
    I've been working with computer editing systems for longer than i can remember and at a certain point you just have to adapt your workflow to the limitations of the software.  

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

  • I want to deploy an application using firefox but I don't want it set as default browser. I am using mozilla.cfg to lockdown firefox.

    I am deploying an application using firefox. I am using the mozilla.cfg file to lockdown firefox and I don't want firefox to be the default browser.

    Try the option to "Force Firefox to make itself the default" as shown in this article - http://kb.mozillazine.org/Default_browser
    Another possibility is your email application may be hard-coded to use IE.

  • HT2371 I started to set up new ipad, I accidentally selected portuguese although I want the ticked default english that showed on first screen. Localisation screen came up (in portuguese) but don't want to continue in portuguese. How to start over? Helpes

    Started set up on ipad. When I went to second screen, showing list of more language preferences I accidentally touched portuguese and this must have replaced the default, ticked, English option. Next screen, localisation, came up (in Portuguese) but I don't want to proceed in this language. how can I start over again. The ipad therefore is not set up with normal screen of apps etc. therefore I cannot change language back using this screen.
    I also tried to Restore my Ipad to factory settings via itunes. You must update to latest version of Ipad software as part of this. The download is about 1 GB and takes 3 hours. Unfortunately when I try this on my PC it installs half the download then drops it - I have tried 3 times and it drops it after an hour and a half each time. I am hoping therefore there might be some simple way of setting up ipad that does not involve 'Restore and Update'. Very frustrated. Please help. Stuck.

    If you press the home button it should come up with some options. One of them will be start over. Those options will be in the different language but you can try each one and via process of elimination eventually will get back tot the default screen.

  • X11 Quartz Don't want as default Server

    Hi,
    I recently installed some software that needed me to install X11 - Quartz so I could run it. Once X11 -Quartz was insalled a pop up notice came up saying that I need to logout and login to make it my default server... what does it mean my default server and how do I stop it from being a default server as I don't want it to be?
    Thanks

    What is the value of the spellchecker.dictionary pref on the <b>about:config</b> page?
    You can open the <b>about:config</b> page via the location/address bar.
    You can accept the warning and click "I'll be careful" to continue.
    *http://kb.mozillazine.org/about:config
    If you do not keep changes after a restart or otherwise have problems with preferences, see:
    *http://kb.mozillazine.org/Preferences_not_saved

  • How to make a scroll animation constantly fixed after scrolling? I want the animation to Start when I scroll down, but I don't want the animated thing to disappear when I scroll up again.

    How to make a scroll animation constantly fixed after scrolling? I want the animation to Start when I scroll down, but I don't want the animated thing to disappear when I scroll up again.
    I know how to start the animation by scrolling down, but I simply want it to stay there after it. Could you help me please, guys?

    Hi Tom,
    There is no native feature in Muse to achieve this.
    Regards,
    Aish

  • Don't want horizontal scroll therefore want to reduce size of the report

    hi
    pls help me.I don't want horizontal scroll in my report.Some of the columns are going out of the window.
    therefore I want to reduce the size of the report.cant found any thing to do this.
    BHARAT THOSAR

    I had the same problem and found help here in the forum. I think it was Vikas who gave me the following tip:
    In the CSS Style of your column attributes type something like this:
    display:block;width:100px;overflow:hidden;
    in order to determine the width of your column. You got to play arround with this a bit to get
    the result you expect.
    Denes Kubicek

Maybe you are looking for

  • Problem in F-54

    Dear All TDS deducted against advance payment is not getting reversed while transfering  from Spl GL to Normal GL ,executing in Tcode F-54 and When adjusted against invoice the TDS is getting reversed with the Vendor Description against TDS GL accoun

  • Can you use apps from one computer/iTunes accounts on multiple iPhones?

    Hello All! I have been using a 3G since they were released on and syncing it to one computer and one iTunes account. My wife now wants an iPhone as well. I know what Apple's policy is on music and video, but what about app sharing. *If the phone is s

  • Open a form with space on the path with form builder from a batch

    Hi, I cannot open a form from a batch on Windows if the absolute path contains spaces. For example, if I try to open a form in "C:\" from cmd with C:\ORANT\bin\ifbld60.exe C:\Form.fmb, I have no problem, if I try to open a form in "C:\Documents and S

  • Oracle Test Manager - Import of Manual Tests - Fails with ORA-12520:

    Hi, This issue occurs when we are trying to import manual tests into the Oracle Test Manager. The import fails when we try to import more than 300 records. The error message in the log is as shown below: Driver's SQLSetConnectAttr failed ORA-12520: T

  • DSN for ODBC (RDO) connection ?

    Hello ! I have an ACCESS database on a webserver and I wish to connect Crystal Report 2008 to it. Till now I have always used connection with DB on the same computer as CR so "Access/Excel (DAO)" was the way I connected to my *.mdb file. This time, w