Flex ImageSnapshot Dynamically Updating Datagrid

Posted on 2011-05-05
Last Modified: 2012-05-11
I'm using ImageSnapshot to capture a datagrid and convert it to a JPG. However, when I update the datagrid with new data, the snapshot doesn't update. I'm thinking it has something to do with the initializing of the variable when the function is called.;

private function callVBS(gradeGridSource:IBitmapDrawable):void {

var imageSnapGrid:ImageSnapshot = ImageSnapshot.captureImage(gradeGridSource);
var imageByteArrayGrid:ByteArray = as ByteArray;

Question by:skibama1
    LVL 29

    Accepted Solution

    Try capture DataGrid wrapper container for example

    <mx:VBox id="holder">
    <mx:DataGrid id="gradeGridSource"/>

    var imageSnapGrid:ImageSnapshot = ImageSnapshot.captureImage(holder);
    var imageByteArrayGrid:ByteArray = as ByteArray;
    LVL 1

    Author Closing Comment

    The problem turned out to be something else, but your sugesstion worked also. In addition, I referenced the component itself without passing it to the function and this worked too. Thanks!!!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
    For Sennheiser, comfort, quality and security are high priority areas. This paper addresses the security of Bluetooth technology and the supplementary security that Sennheiser’s Contact Center and Office (CC&O) headsets provide.  
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video discusses moving either the default database or any database to a new volume.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now