Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Flex ImageSnapshot Dynamically Updating Datagrid

Posted on 2011-05-05
2
Medium Priority
?
391 Views
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 = imageSnapGrid.data as ByteArray;

}
0
Comment
Question by:skibama1
2 Comments
 
LVL 29

Accepted Solution

by:
dgofman earned 1600 total points
ID: 35700529
Try capture DataGrid wrapper container for example

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

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

Author Closing Comment

by:skibama1
ID: 35712624
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!!!
0

Featured Post

Evaluating UTMs? Here's what you need to know!

Evaluating a UTM appliance and vendor can prove to be an overwhelming exercise.  How can you make sure that you're getting the security that your organization needs without breaking the bank? Check out our UTM Buyer's Guide for more information on what you should be looking for!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
I’m willing to make a bet that your organization stores sensitive data in your Windows File Servers; files and folders that you really don’t want making it into the wrong hands.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

578 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