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

Cell Value Change Event

10 Answers 1008 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Avnish
Top achievements
Rank 1
Avnish asked on 12 Nov 2015, 12:15 AM

How can I add an event handler to a change in a cell value? This may be in works for the full release but does anyone have a temp solution for this?

 

Thank You!

10 Answers, 1 is accepted

Sort by
0
Avnish
Top achievements
Rank 1
answered on 12 Nov 2015, 01:29 AM

EDIT: Found a temporary solution -->

 

$('#spreadsheet .k-spreadsheet-cell-editor').bind('focusout', function () {
    var toolTip = $('.k-tooltip');
    var cell = $(toolTip).eq(1).text();
    var value = $(this).text();
    alert(cell + " -> " + value);
});​

0
Alex Gyoshev
Telerik team
answered on 16 Nov 2015, 08:53 AM

Hello Avnish,

At this time there is no change event in the widget, but it has been logged for consideration for future releases. You can vote on UserVoice to raise its priority.

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
John Tobin
Top achievements
Rank 1
answered on 20 Jan 2016, 05:54 PM

Hi Alex,

 I could really use this spreadsheet widget. Currently I use the silverlight spreadsheet control but have to move to a HTML 5 version very soon. Have you any idea if a cell value changed event might be included in the next release?

Thanks,

John

0
Alex Gyoshev
Telerik team
answered on 21 Jan 2016, 08:59 AM

Hello John,

We have not implemented this yet, but it is likely that it will land soon. There have been many requests for that specific event.

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
John Tobin
Top achievements
Rank 1
answered on 29 Feb 2016, 04:04 PM

Hi Alex,

seems that the onchange event has been released in the in Q1 2016.

However, i was expecting to get the object ( in this case the cell ) that fired the onchange event.

Instead, seems that the sender is the worksheet itself.

So, Is there another way to achieve this? That is, get the cell whose values has changed?

 

Regards,

 

0
Alex Gyoshev
Telerik team
answered on 02 Mar 2016, 08:09 AM

Hello John,

See the change event documentation, the range property of the event argument should provide that. The event is introduced in 2016.Q1.SP1, version 2016.1.226.

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
John Tobin
Top achievements
Rank 1
answered on 02 Mar 2016, 05:33 PM

Hello Alex,

unfortunately the Range object is not able to return the position of the cell (i.e.:  "C2" or "B5").

It is possible to get the value(), but, as far as i can see, not the R1C1 position of the cell.

Regards,

 

0
Alex Gyoshev
Telerik team
answered on 03 Mar 2016, 12:27 PM

Hello John,

Currently such data is not exposed in the public API. You could access it via a private API -- e.range._ref.print(), but that is not recommended and may break without notice. Can you please elaborate what is the use case behind this?

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
John Tobin
Top achievements
Rank 1
answered on 03 Mar 2016, 12:46 PM

Hi Alex,

thanks for your clarification.

I am actually trying to extend the 'cell object', in order to contain not only a Value and layout attributes. I would attach custom objects , with own properties.

And what i m trying to do is to individuate exactly which cell of the sheet has fired the onChange event. Also a Row-Col index would work. In order, then to get the 'cell object' and loop through its properties.

 

Is it something i can achieve at this stage?

 

Thanks

 

0
Alex Gyoshev
Telerik team
answered on 03 Mar 2016, 03:16 PM

Hello John,

There is an undocumented forEachCell method on the range, which was just documented. It accepts a callback, which will be called for each cell, and will receive the row index, column index, and cell options. Then you can maintain a hash with the row/column indices.

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Spreadsheet
Asked by
Avnish
Top achievements
Rank 1
Answers by
Avnish
Top achievements
Rank 1
Alex Gyoshev
Telerik team
John Tobin
Top achievements
Rank 1
Share this question
or