You can use link button as itemrendrer to achieve this & on click of this you can show PopUp with product details.
Here is my column definition for a link:
<mx:DataGridColumn headerText="View" dataField="link" width="50" editable=" false" textAlign="center"> <mx:itemRenderer> <fx:Component> <mx:LinkButton label=". . ." color="blue" fontSize="16" fontWeight=" bold"> </mx:LinkButton> </fx:Component> </mx:itemRenderer> </mx:DataGridColumn>
You will need to set a click listener for LinkButton. To open a new window I use this:
reportString = "window.open('" + reportString + "', ShipInfo', 'status=0,toolbar=0,resizable=yes')";ExternalInterface.call(reportString);
When the User clicks on the individual Product names I definately need an IE browser window to open to show the Product details.
Is there anyway to actually make the Product names look like they have a hyperlink, like the usual weblinks that when you click it opens a web browser window?
Of course. Make it like this:
have your tried with navigateToURL?
var openXlsUrl1:String = "";
connection_request = new URLRequest("."+"/PopUpServlet"+"?"+here you can add parameters.); // here from PopUpServlet you can send data back to client-side.
connection_request.data = new URLVariables("testSQL=" + testSQL);
connection_request.method = URLRequestMethod.POST;
I think showing Flex popUp is much easier than this.
I am using a method to create my datagrid so can use dg.itemrenderer = a component renderer. How will the component renderer know which data was clicked in the datagrid column, as there will be many rows of data for that cloumn and hence which URL to go to?
Is there any sample code you could provide?
So thinking about this a bit more I guess I will have to include a tag in my XML for Products that contains the URL to go to for that Product. This URL can then be obtained in the Renederer and a click handler will handle which Product was clicked. I am on the right track here?
1 person found this helpful
That is exactly right. I usually have more data in my dataProvider than I am showing in a dataGrid.