cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

opening a popup window on hyperlink click event within a grid in thingworxs

ng1
1-Newbie
1-Newbie

opening a popup window on hyperlink click event within a grid in thingworxs

I have formatted a gird column to an html text like example

<div align="center" style="margin-right:10px; float:left; width:25px;height:25px;border:1px solid #000;">'+ '<a target="_blank" align="center" href="http://google.com">' + 15 + '</a>' +'</div>'

This shows a box in which there is a hyperlinked number, on click of that number it opens a google window in new window tab.

I would like to open a popup window within which i show a mashup(similar to navigation widget).

Is it possible???

10 REPLIES 10
PaiChung
22-Sapphire I
(To:ng1)

If you know the context of the selection in your grid, then you can trigger Navigate on a Nav widget and get the pop-up effect. (Use selected row to set the link on the Nav widget)

ng1
1-Newbie
1-Newbie
(To:PaiChung)

I have two columns having a hyperlink, i need to open a pop up window similar to navigation widget depending on which column is clicked.

I don't need a selected row event, i need to use the column click event. How is it possible?

atahri
4-Participant
(To:ng1)

Hello, I am having the same issue. Any link on how to do this ? 

PaiChung
22-Sapphire I
(To:atahri)

The way a selected ROW value is passed into a Nav and resulting mashup would be

1. You can pass a row value as the name of the mashup to open (if you need something that dynamic) This is something that you might do for example if you have different BaseTypes and each opens a specific pop-up

2. Using mashup parameters that are in the Target Mashup, they will show up as bindable parameters in the Nav widget when the mashup is assigned, you can use this to pass selected row values into the pop-up mashup. For example the row ID so you can use that in the pop-up to pull up additional information related to that ID

 

Hope that is what is being asked.

 

To get Column Context, you'll need some custom grid unfortunately.

gvejandla
1-Newbie
(To:ng1)

It is possible. same as Pai Chung said, I gave selected row "vending position" as input parameter to nav widget.1.png2.png

ng1
1-Newbie
1-Newbie
(To:gvejandla)

Agreed...!!!!!!!

But one of my column is a look a like of hyperlink. on click of hyperlink only(not row, its just the hyperlinked column) I need to launch a navigation widget window.

if I use the in built, hyperlink option, it will not allow me to navigate to internal mashup's on a popup, it will always open in a new tab or replace the self.

ng1
1-Newbie
1-Newbie
(To:gvejandla)

For Example, if you look at the screen shot

there are three boxes. I need to select that hyperlink to open a navigation widget popup screen..

gvejandla
1-Newbie
(To:ng1)

May be I am wrong but I don't think it's possible, refer to this thread : Grid Actions

ng1
1-Newbie
1-Newbie
(To:gvejandla)

If you see the screen shot its a grid from thingworx itself, the last column I have framed a HTML and bound to the column data. When I configure that column I am using HTML to render that data. So we can see those hyperlinks in three boxes.

<div><a href="#mashup="xyz" target="_blank">111</a><div>

So when we click on 111 hyperlink, this xyz mashup will open in a new window  tab because of target setting.

So to open in a pop up window, I thought I could write a javascript function for onclick of anchor tags. but ubfortunately, it isn't supporting java scripting within HTML.

Any idea>?

Could you please guide me , what are the changes should I do To get the selected value of  the grid in the popup..as shoen in the figure?

Top Tags