If it were me, I would create an item renderer for that column and extend 
button. Add the click handler in the renderer to generate the license number.


--- In flexcoders@yahoogroups.com, "Pilby" <i...@...> wrote:
>
> Thanks for responding, Tracy.
> 
> Let's say this is an application that allows generation of license numbers.
> Imagine this:
> 
> You have 3 columns in the datagrid. The first and second columns are the
> first and last names of a person. The third column is a button (which is
> really part of an MXML component) that has it's 'label' set as "Click to
> generate license number". When the user clicks the button, the logic to
> generate the license number is within the component and will be output to
> the label property of the button, and the button will no longer be
> clickable. The application allows multiple people to be listed in the
> datagrid. Outside the datagrid, there is a button that says "Click to print
> all".
> 
> Given the specs I described so far, it's clear that I have to be able to
> iterate through each row in the datagrid, extracting the data from each
> column of each row. Typically, I would just get the dataProvider array
> collection object, and the problem would be solved. But because the license
> number is being output through the label property of the button (which is
> part of a MXML component) and is not part of the original dataProvider data,
> I can't go that route.
> 
> I figured I now have to somehow iterate through each row, grabbing the data
> of each column of the row and storing it somehow. Is there a way for me to
> get the license number from the label property of the buttons?
>


Reply via email to