1 Reply Latest reply on Jun 13, 2007 1:40 PM by ntsiii

    DataGrid question

      I have a mx:Canvas with a DataGrid .

      Then, I have a new tile window, and drag (from Outline, on Eclipse) this custom Canvas to my new tile window.

      In this new tile window I want to add some new columns and I receive this error message:

      In initializer for 'myGrid': type mx.controls.dataGridClasses.DataGridColumn is not assignable to target type mx.controls.DataGrid. myForm.mxml

      This is my code to add a new column on my new tile window:

      <mx:DataGridColumn headerText="Text" dataField="myField" textAlign="right" width="70"/>

      Anyone can help me?

        • 1. Re: DataGrid question
          ntsiii Level 3
          This is because you are trying to put a DataGridColumn as a child of Canvas, which makes no sense.

          If you want to be able to do this, I think you will have to extend DataGrid, instead of using a composite mxml conponent.