?
Solved

link within flex dataGrid

Posted on 2009-12-21
7
Medium Priority
?
740 Views
Last Modified: 2013-11-11
I need to place an account number within a datagrid column that will cause a link to another application using the account number as part of the url. The account number in the datagrid needs to be blue and underlined so the user knows it represents a link.
0
Comment
Question by:flexNewbie
  • 4
  • 2
7 Comments
 
LVL 19

Expert Comment

by:moagrius
ID: 26099691
here's a link with an example and source code for creating custom itemRenderers:

http://butterfliesandbugs.wordpress.com/2007/06/14/changing-text-color-in-a-datagrid-using-itemrenderers/
0
 
LVL 37

Expert Comment

by:zzynx
ID: 26103301
0
 

Author Comment

by:flexNewbie
ID: 26108152
Thanks for the quick reply but I don't see the itemRenderer for Moagrius' code. Zzynx. the item render works but how can I move the link value to the grid containing the link button, make it blue and under lined? Now it only says "click on me"
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 37

Accepted Solution

by:
zzynx earned 2000 total points
ID: 26110710
>> Now it only says "click on me"
Of course! That's because of the line

  label="Click On Me"

in the renderer code.
For this example, replace it by

  label="{data.url}"

and you'll see the URL instead of "Click On Me".
You can do the same to have it displayed your value instead of "Click On Me"


>> make it blue and under lined?
Add this to your linkButton:
color="#0000FF" textDecoration="underline"

So to conclude:

urlRenderer.mxml now looks like:

<?xml version="1.0" encoding="utf-8"?>
<mx:LinkButton xmlns:mx="http://www.adobe.com/2006/mxml"
      label="{data.url}"
      color="#0000FF" textDecoration="underline"
      click="navigateToURL(new URLRequest(data.url))"/>
0
 
LVL 37

Assisted Solution

by:zzynx
zzynx earned 2000 total points
ID: 26110722
The result looks like this
ScreenShot024.png
0
 

Author Closing Comment

by:flexNewbie
ID: 31668706
Thanks!
0
 
LVL 37

Expert Comment

by:zzynx
ID: 26112780
Thanx 4 axxepting
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
Suggested Courses
Course of the Month16 days, 6 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question