cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Champion
Community Champion

Re: Custom Table Visual URL issue

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

Highlighted
Helper II
Helper II

Re: Custom Table Visual URL issue

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

Highlighted
Community Champion
Community Champion

Re: Custom Table Visual URL issue

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

Highlighted
Helper II
Helper II

Re: Custom Table Visual URL issue

@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 

Highlighted
Community Champion
Community Champion

Re: Custom Table Visual URL issue

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

Highlighted
Helper II
Helper II

Re: Custom Table Visual URL issue

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

Highlighted
Community Champion
Community Champion

Re: Custom Table Visual URL issue

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

Highlighted
Helper II
Helper II

Re: Custom Table Visual URL issue

@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

Highlighted
Community Champion
Community Champion

Re: Custom Table Visual URL issue

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors