function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PBS_IC786PBS_IC786 

Flex toolkit questions

2 questions as I am new to Actionscript and Flex:

1) How can I make data in a flex datagrid show up as a hyperlink if I am using an Arraycollection to populate the grid?

2) Is there any way in Flex/actionscript to combine multiple datasets (various custom objects related to 1 common custom object) and display them in a specified order?

Any help is greatly appreciated...

Thanks
JashuganJashugan

1) How can I make data in a flex datagrid show up as a hyperlink if I am using an Arraycollection to populate the grid?


What do you mean by this? Is it simply a element in the array that will be a URL, or is there URL's interspersed with text? If it is the former, then you could probably change the itemRender for a DataGridColumn to a link button. If it is the latter, you probably have to parse the text and convert the URL's to HTML hyperlinks.
PBS_IC786PBS_IC786
It is an element in an array and the element is actually an id value for a custom object in my instance.  I think I need to use the itemrender thing.

Do you have an example of this?  I located the itemrender property you were referring to but what do I need to set it to in order to dictate what the link should be for each element in that column of my grid...

Thanks for the response...I appreciate your help...

Message Edited by PBS_IC786 on 06-24-2007 08:32 PM

JashuganJashugan
Here it is.

RenderState code is given in the comments. The main component is a List and not a DataGrid, but the rendere component is a link button.

Message Edited by Jashugan on 06-25-2007 08:52 AM

Message Edited by Jashugan on 06-25-2007 08:53 AM

PBS_IC786PBS_IC786
I am having a very frustrating time with this.  The rendererstate parameter passed into classfactory is giving me an error about it being undefined.  I created a separate mxml file from my application file with the custom itemrenderer code in it but for some reason my application file does not see that as the rendererstate code.  Not sure what is going on or what to do now...

Is there an easier way to get links into a datagrid without all the trickery with itemrenderers?

Thanks for all your help...I appreciate it
JashuganJashugan
JashuganJashugan
Note that I just started Flex last week, so this may not be the ideal way to do it. I used inline item renderers (no worrying about the factory thing).
testortestor
How did you use itemrenderer?  I'd like to see what you finally did to get it working.