Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 427075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:32:36+00:00 2026-05-12T19:32:36+00:00

I have a datagrid in my mxml file, say, samp.mxml. <mx:DataGrid id=taskDataGrid dataProvider={initDG} variableRowHeight=true

  • 0

I have a datagrid in my mxml file, say, samp.mxml.

<mx:DataGrid id="taskDataGrid" dataProvider="{initDG}" variableRowHeight="true" 
    editable="true" width="100%"  paddingBottom="1" paddingTop="1" height="55" > 

<mx:columns>

      <mx:DataGridColumn dataField="Select" 
                editable="true" 
                rendererIsEditor="true" 
                itemRenderer="mx.controls.CheckBox" 
                editorDataField="selected" />

      <mx:DataGridColumn dataField="TaskName"
                width="220"
                editable="true" 
                rendererIsEditor="true" 
                itemRenderer="components.taskComponent"/> //i call the component.

      <mx:DataGridColumn dataField="TaskId"
                itemRenderer="mx.controls.TextInput" />     

 </mx:columns>
 </mx:DataGrid>

In one of the columns of the datagrid, I have to display a text input box and a button. So I have written that functionality as a separate component,i.e, taskComponent.mxml

 <mx:TextInput id="TaskName"
    editable="true" 
    text="{data.TaskName}" 
    mouseDown="addTaskRow(event);"    
   /> 

 <mx:Button id="searchTask" label="..." width="30" height="25" click="showPopUp();"/>

Now If i click the text input box in the component, I want another data row to be added. Earlier I had it as, if I click the datagrid, a row gets added. So I wrote the function in the samp.mxml itself. This is the function to add a data grid row.

private function addTaskRow(event:MouseEvent):void
        {
            taskDataGrid.dataProvider.addItem(
                {

                }
            );
            taskDataGrid.height += 30; 

        }

If i try to write the function in the taskComponent file, it shows the error, “Access of undefined property taskDataGrid”. How do I use the datagrid in the taskComponent?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T19:32:37+00:00Added an answer on May 12, 2026 at 7:32 pm

    Add trace(this.owner); to the mouseDown of the text input and see what it traces. If it traces something like [object DataGrid], you can use DataGrid(this.owner) to access the taskDataGrid.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 246k
  • Answers 246k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer NSURL does have this method: - (BOOL)checkResourceIsReachableAndReturnError:(NSError **)error Which "Returns… May 13, 2026 at 8:30 am
  • Editorial Team
    Editorial Team added an answer The best way to do this is to pre-render the… May 13, 2026 at 8:30 am
  • Editorial Team
    Editorial Team added an answer You'll have to store IPrincipal somewhere and restore it with… May 13, 2026 at 8:30 am

Related Questions

I am rather new to flex and am trying to figure out how to
I am trying my first flex application. And have a problems adding data from
I'm still a newbie to Adobe Air/Flex, and still fairly new with SQL. I've
I have a datagrid with different types of columns, like I have checkboxes, combo

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.