I don’t think you can have a script block for a child tag. I think all
script blocks belong to the top-level tag.

You should be able to declare an mxml component with DataGrid at the top.
Flex 4 users should be able to use fx:Component in the fx:Declarations
block as well.

-Alex

On 4/28/15, 4:06 PM, "mark goldin" <[email protected]> wrote:

>Sorry for the confusion. DataGrid lives inside of a VBox along with other
>components.
>
>On Tue, Apr 28, 2015 at 5:49 PM, Rudolf Schnetler <[email protected]>
>wrote:
>
>> I don't understand what are you trying to do. Do you want to change the
>> dataprovider dynamically depending on a condition?
>>
>> On Wed, Apr 29, 2015 at 5:13 AM, mark goldin <[email protected]>
>> wrote:
>>
>> > I am trying to come up with the following datagrid definition:
>> > <mx:DataGrid headerHeight="0" rowHeight="28"
>> >  dataProvider="{_someData">
>> > <mx:Script>
>> > <![CDATA[
>> > override public function set dataProvider(value:Object):void
>> > {
>> > if (value)
>> > {
>> > }
>> > else
>> > {
>> > }
>> > }
>> > ]]>
>> > </mx:Script>
>> > <mx:columns>
>> > ........
>> >
>> > I am getting:
>> > Method marked override must override another method.
>> >
>> > Any idea why am I getting it?
>> >
>> > Thanks
>> >
>>

Reply via email to