This is a migrated thread and some comments may be shown as answers.
Spreadsheet with images
2 Answers 15 Views
This is a migrated thread and some comments may be shown as answers.
Dhruven
Top achievements
Rank 1
Dhruven asked on 02 Mar 2020, 07:31 PM

Hello,

I am working with Spreadsheet and I have a question regarding images.

When I have more than one image on a spreadsheet, on click of those images I want to get info about the image more specifically range of the topLeft cell the image is attached to.

If there is just one image on the sheet I can got to the JSON object of the sheet and just get the only image form the object but if there are more images I want to specify which image is attached to which cell, but the only catch is I want the information on click of an image not cell.

Is it possible to get it?

 

Thank you in advance.

2 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 03 Mar 2020, 07:50 AM

Hello, Dhruven,

After research, currently, we can suggest attaching a click event over all of the images. Then in that click event inside the style of the element, there will be a background image property that will contain the URL of the image. The URL can be used to differentiate the images. As we pass a collection of drawings to the Spreadsheet, the URL can be used to go over the same collection and find the topLeft cell of the image based on the URL:

https://stackblitz.com/edit/kendo-react-spreadsheet-jnfeof?file=app/main.js

As I agree that this is not ideal, I can suggest making a feature request to provide a click callback as part of the drawing props. The request can be submitted here:

https://feedback.telerik.com/kendo-jquery-ui

Regards,
Stefan
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Dhruven
Top achievements
Rank 1
answered on 03 Mar 2020, 01:41 PM

Hi Stefan,

 

Thank you do much for your reply and the solution. 
As you said, it is not an ideal solution but I can make it work for now. 
For sure I will create a feature request for a fix. 

 

Thanks again. 

Asked by
Dhruven
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Dhruven
Top achievements
Rank 1
Share this question
or