This is a migrated thread and some comments may be shown as answers.

Need a connection of html for cell range in spreadsheet

1 Answer 175 Views
Wrappers for React
This is a migrated thread and some comments may be shown as answers.
Dhruven
Top achievements
Rank 1
Veteran
Dhruven asked on 12 May 2020, 02:41 PM

Hi,

I am working with spreadsheet wrapper for React and I am in need of a connection between cell range and cell's html. 
For an example, I have "Hello world" in cell "B2". Now I want to get html for that specific cell using sheet.range(1,1) instead of looping through all the cells using document.querySelector('.k-spreadsheet-cell'). 

Is it possible? If it is then can I get a small example. 

 

Thank you.

 

 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 13 May 2020, 01:32 PM

Hello, Dhruven,

The range has value and values method which are both getters and setters:

https://docs.telerik.com/kendo-ui/api/javascript/spreadsheet/range/methods/values

https://docs.telerik.com/kendo-ui/api/javascript/spreadsheet/range/methods/value

https://stackblitz.com/edit/react-kl69hj?file=app/main.jsx

If the requirement is to get the DOM element, I can suggest using the selected method, to select the range then only select the cells with class "k-spreadsheet-active-cell".

Regards,
Stefan
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Wrappers for React
Asked by
Dhruven
Top achievements
Rank 1
Veteran
Answers by
Stefan
Telerik team
Share this question
or