Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

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 

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

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

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.