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

  • SEARCH
  • Home
  • 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 3789540
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:10:21+00:00 2026-05-19T12:10:21+00:00

Guys I’ve a grid view in flex, one of the columns is rendered like

  • 0

Guys I’ve a grid view in flex,

one of the columns is rendered like this:

<mx:DataGridColumn headerText="Cancel"  >
      <mx:itemRenderer>
       <fx:Component>
        <mx:Box width="100%" height="100%" horizontalAlign="center" verticalAlign="middle">
         <mx:Button label="Download" width="100%"  >
          <mx:click>someFunction();</mx:click>
         </mx:Button>
        </mx:Box>
       </fx:Component>
      </mx:itemRenderer>
      </mx:DataGridColumn>

now I’ve a problem that the function in button click is not being recognized. It says “call to a possibly undefined function” even though it was defined. What is wrong with this? How do i make a button in a grid call a function in the same mxml file??

thanks

  • 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-19T12:10:22+00:00Added an answer on May 19, 2026 at 12:10 pm

    Your itemRenderer is considered its own encapsulated component so it’s looking for someFunction() within the itemRenderer itself. To call a function you have defined in the mxml file that contains your DataGrid, try calling the function using outerDocument.someFunction();.

    If you would like to define the function at the itemRenderer level, you could do something like this:

    <mx:itemRenderer>
      <fx:Component>
        <mx:VBox>
          <fx:Script>
          <![CDATA[
    
            public function someFunction():void
            {
              // Do Something
            }
    
          ]]>
          </fx:Script>
    
          <mx:Button click="someFunction();"/>
        </mx:VBox>
      </fx:Component>
    </mx:itemRenderer>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Guys i got a dataColumn already defined as <mx:DataGridColumn headerText=Role id=roleAdmin headerStyleName=myHeaderStyles> <mx:itemRenderer> <fx:Component>
guys i have a xml file which is like this: <Point TestFlag=0 id=1 name=Conversation
Guys i've got an array thats like this: array(3) { [2]=> array(1) { [name]=>
guys please help me to create one simple search engine it should be like
guys, I would like to you evaluate next code below. As you see, I
Guys, I've came across this problem I can't resolve myselg, I'm pretty sure I
Guys I made a customised list view, The list view has three text fields.
Guys, I am very new to c++. I have just wrote this class: class
Guys Can you advise good data grid in zend framework expect the zdgrid. I
guys. I have two view controllers with two uiwebviews. Here is my code: First

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.