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
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.
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.
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.
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.
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
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.
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