1

My datagrid component appears to be broken.

When I drag one out onto the stage, its just a square. Nothing in it. Just a square...

Then, when I tried to programmatically add it to the stage, using an example straight off the docs, it throws some errors:

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/DataGrid.html

import fl.controls.DataGrid;
var myDataGrid:DataGrid = new DataGrid();

Errors:

1172: Definition fl.controls:DataGrid could not be found.
1046: Type was not found or was not a compile-time constant: DataGrid.
1180: Call to a possibly undefined method DataGrid.

This sounds very bad, especially considering that I need to use the DataGrid to complete my program.

What am I doing wrong and how can I fix it? This is AS3, right in frame 1 of the main timeline.

Cyclone
  • 17,939
  • 45
  • 124
  • 193
  • Update: The datagrid component IS in the right place, but maybe it isnt initializing properly? How can I reinitialize it? The file is `C:\Program Files\Adobe\Adobe Flash CS3\en\Configuration\Components\User Interface\DataGrid.swc` – Cyclone Jan 18 '10 at 21:48
  • Update: The rest of the components work just fine, this is the only broken one...I *really* need this working! – Cyclone Jan 18 '10 at 22:45

1 Answers1

1

enable "Components" panel -> drag datagrid component inside the library panel -> it should work now

antpaw
  • 15,444
  • 11
  • 59
  • 88