cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anandsoftweb
Helper II
Helper II

Custom Table Visual URL issue

Hello Folks,

 

I have created table custom visual but it has issue with open the URL on direct click of table cell.

 

So is there any way to open the direct link on click of table cell( or td) in custom table 

 

Your help will be much apprecieated.

 

Thanks in Advance.

 

 

9 REPLIES 9
v-viig
Community Champion
Community Champion

Hello @anandsoftweb,

 

Please take a look at Launch URL API that allows to open external url in browser.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Hey @v-viig

 

Thanks for your response...

 

I am just looking for to bind the url link in html table in multiple rows cell so example

100 rows are in table then I want to bind dynamic link with each row data within table cell

 

So, how can I do it using this article Please help me out here.

 

Thanks

v-viig
Community Champion
Community Champion

You need to show a hyperlink as a text of div element and bind onClick event.

Once user clicks the div your code should invoke Launch API as shown in the documentation.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

@v-viig

 

It will not work, as I have tried it but due to our custom visual is loading under iframe so onclick event does not invoking directly

 

if you have any working example with custom table which is using this below example

https://github.com/Microsoft/PowerBI-visuals/blob/master/Tutorial/LaunchURL.md

 

That will help me.

 

Thanks 

v-viig
Community Champion
Community Champion

You might take a look at Sample Bar Chart to find out more about Launch URL API.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Hey @v-viig 

 

Thanks for your response... I understood with bar chart 

 

But can you help me with custom table and multiple link coming from source will open on click of table cell

 

Thanks

v-viig
Community Champion
Community Champion

Custom Table should implement the same way as implemented in Sample Bar Chart.

You should bind data with hyperlink to each cell to be able to get data onClick event.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

@v-viig

 

The way I want is in custom table in which it should bind with multiple row click event so here I am not sure how to bind on table on each row click. do you have any example which is doing exactely the same which I want.

 

Thanks

v-viig
Community Champion
Community Champion

We don't have any sample that does exactly the same.

We'd suggest you should bind a click event using addEventListener if you use plain JS or use .on('click', ) if you use d3 or jQuery.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors