Declined
Last Updated: 25 Feb 2020 15:26 by ADMIN
Doug Hills
Created on: 21 Dec 2017 21:45
Category: Spreadsheet
Type: Feature Request
3
In needing to place things in the cells of spreadsheets (such as images and my own custom controls) as can be seen in my images 1 and 2, it
I checked out the feature request provisions on your site. Since I'd like to include photos with my description, I'm hoping that it is okay that I send this to you for forwarding on to the appropriate audience.

My feature request involves the spreadsheet control in Kendo's JQuery controls

The request is for an attribute to be added to a cell of a spreadsheet which can be used by JQuery to associate the HTML dom element with the spreadsheet's javascript model. Here is why:


In needing to place things in the cells of spreadsheets (such as images and my own custom controls) as can be seen in my images 1 and 2, it is necessary to know which div.k-spreadsheet-cell corresponds with a kendo javascript spreadsheet cell. As a work around, I have given my custom controls an index number. In the kendo javascript object, I set the cell's background color to the same value as that index. This gave me two benefits: 1) it put a characteristic on the cell's div object that could identify the cell; 2) it rendered the cell even if it had no content--this is particularly important.

In my image 4, you can see the background color attribute of a cell div. In image 3, you can see my collection of custom controls. Each of my div.custom-control has a control_index property. I have a routine that runs periodically to reckon the location and size of each control whose background color is set to a value matching one of my cell's control indices. Once located, the controls are laid down onto their respective cells at their appropriate size (or made invisible if the target cell is scrolled off of the container).

This work around contains a lot of painful overhead. For instance, when a spreadsheet is first rendered, I have to traverse the div.k-spreadsheet-cell elements to check their background color attributes. If they qualify, a css class must be placed on the cell so that a black cell isn't presented in the time that it takes to reckon and position my custom controls.

If there were a 'tag' attribute that could be added to a cell's javascript model and that tag was ascribed to the div.k-spreadsheet-cell element (AND make the element render even if it is otherwise trivial), this operation would be a lot easier. I think that I'm not the only one who would like to take some control over the dom objects of the spreadsheet control. 

I would be happy to discuss this further with anybody who is interested.

Thanks,

Doug
1 comment
ADMIN
Veselin Tsvetanov
Posted on: 25 Feb 2020 15:26

Hi Doug,

The cell HTML elements in a Spreadsheet are reused multiple times for different ranges of the Sheet. That is part of the virtualization logic of the widget which allows us to load a large number of rows and columns in the Spreadsheet. Having that said, adding a custom attribute to a cell configuration and render it later on an HTML element would interfere with the virtualization logic.

In case you have any further questions, please do not hesitate to contact us.

Regards,
Veselin Tsvetanov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.