0 Replies Latest reply on Mar 11, 2010 2:56 AM by Vipulsharma03

    Changes to datagrid not getting reflected in bitmapdata

    Vipulsharma03 Level 1

      Hi,


      I am exporting the entire canvas as snapshot to an image. I tried hiding a button from the image using myButton.visible = false;
      then, taking the snapshot as
      ---var bd:BitmapData = new BitmapData(ctrlHeatMapDataGrid.width,ctrlHeatMapDataGrid.height);
      ---bd.draw(ctrlHeatMapDataGrid);
      and then displaying the button back so that no change is noticed on the screen.
      This works fine.


      But when I tried to hide the scrollbars from a datagrid (making the horizontal and vertical scoll policy as off), and then taking a snapshot, the snapshot is taken with the scrollbars on.
      It seems that the earlier image is cached somewhere becuase of which the stale image is getting captured in the bitmapdata.
      I tried it with the height and width of the datagrid also, but the result is same--old image.
      Please help!!