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

Some issues with the Spreadsheet control

8 Answers 224 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Jared
Top achievements
Rank 1
Jared asked on 29 Feb 2016, 09:27 PM

Hello,

I started using the Spreadsheet control and have a couple issues:

1) I am programatically creating a workbook on the server side and using it with a custom provider. When I disable cells on the server side, they are correctly not editable on the client side. However, attempting to modify read only cells generates Javascript error: 0x80070057 - JavaScript runtime error: Invalid argument. For example, this occurs when I highlight a cell, press some number keys, and then hit enter.

 

2) The "auto-complete" feature - the icon on the bottom right of the selected range that allows automatic data generation/copying cannot by selected on IE11. This tool also allows modification of data contained in read only cells. Ideally, I would like to disable this feature, but I cannot find an option to.

 

3) Is it possible to copy data to from another spreadsheet application such as Excel to the RadSpreadsheet, but copy text only? I can copy from Excel now, but it keeps source formatting.

 

4) Is there a onClientCellModified method that I can listen to? I would like to implement some simple client side logic, similar to what a "Macro" would accomplish.

 

Thanks for any help.

8 Answers, 1 is accepted

Sort by
0
alessandro
Top achievements
Rank 1
answered on 01 Mar 2016, 05:00 PM

Hi Jared,

regarding point 4), i m also interested to something similar. 

As far as i know, the only client side event detailed in the demos regards  the context menu (OnClientItemClicked="CellContextMenuItemClicked").

It d be good to know if there exist an OnClientItemChanged or OnCellChange.

 

 

0
Jared
Top achievements
Rank 1
answered on 01 Mar 2016, 08:38 PM

The feature I described in 2) is correctly working in IE11. The cursor just does not change when hovering over the bottom right of the cell selection, which led me to believe it did not work.

The autocomplete feature still allows modification of data contained in disabled cells, however.

0
Jared
Top achievements
Rank 1
answered on 02 Mar 2016, 02:13 PM

I found that you can create a listener for the overall RadSpreadSheet "Change" event, which you can further narrow down to cell modify. I haven't done a lot of testing on it.

var t = $find("<%= rss_test.ClientID %>");
 
 t._widget._workbook._events.change.push(function t(args) {
     if (args.sender._sheet._selectionInProgress == false
         ) {
         args.sender._sheet.suspendChanges(true);
     }
 });

There is likely a way to get to this change event handler array without accessing private properties, but this works.

 

Another issue with read only cells. Cut allows you to delete values from read only cells, and copy allows you to overwrite read only cells.

0
alessandro
Top achievements
Rank 1
answered on 02 Mar 2016, 02:30 PM

Great Jared.

I must say that i tried, using the telerik:RadSpreadsheet ID  instead of rss_test, but var t is null.

 

By the way, could you point  me in the direction where i can get to the change event handler without accessing private properties as you said.

 

 

0
alessandro
Top achievements
Rank 1
answered on 03 Mar 2016, 12:50 PM

Hi Jared,

i dont know if it can be of any help, but i just had this answer from the Support:

 

I am afraid the RadSpreadsheet does not expose OnCellClick and OnChangeValue events for the cells, neither client-side nor server-side. 

Regards,
Ivan Danchev 
Telerik

0
Jared
Top achievements
Rank 1
answered on 03 Mar 2016, 03:57 PM

Thanks alessandro,

Looks to me that me many key scenarios are not yet supported by the RadSpreadSheet. I may have to revisit when it is more fully developed.

The main use case scenario for me is to present a programatically generated spreadsheet, and display a locked down version of it with only several cells as "Input" cells. I could live without a client side "OnCellChanged" event, but the bugs with disabled cells are killing this control for me.

0
Jared
Top achievements
Rank 1
answered on 03 Mar 2016, 04:00 PM
And to your question on the private methods thing, there are "Getter" methods for each of the private fields that I am accessing that return the fields. It is better practice to use the Getter methods than accessing the private fields directly.
0
Bozhidar
Telerik team
answered on 08 Mar 2016, 07:28 AM
Hello,

The issues concerning disabled cells are logged and will be fixed as soon as we can. We will also provide a client Change event in the upcoming Q2 2016 release, which will come out in the first half of May.

Regards,
Bozhidar
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
Tags
Spreadsheet
Asked by
Jared
Top achievements
Rank 1
Answers by
alessandro
Top achievements
Rank 1
Jared
Top achievements
Rank 1
Bozhidar
Telerik team
Share this question
or