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

protect cell or sheet in spreadsheet

9 Answers 520 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
jafar
Top achievements
Rank 1
jafar asked on 18 Mar 2013, 09:43 AM
Hello,
I need to set spreadsheet control or cell to read only .
Is it possible to protect sheet or cell editor for some cell or in a whole spreadsheet?

Thanks

9 Answers, 1 is accepted

Sort by
0
Andrew
Telerik team
answered on 20 Mar 2013, 01:56 PM
Hi Jafar,

Currently that functionality is not available. We will estimate the effort needed for the feature to be implemented.

Unfortunately we cannot give you a specific time-frame when this will happen.

All the best,
Andrew
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
jafar
Top achievements
Rank 1
answered on 25 Mar 2013, 05:25 AM
Hello
Do you have a solution for this problem?
I need just to set spreadsheet control or cell to read only.
Thanks

0
Andrew
Telerik team
answered on 26 Mar 2013, 11:27 AM
Hello Jafar,

As we mentioned in our previous post this functionality is not available. However, you can remove the CellInputUILayer and thus disable inputting any data in the cells. You can achieve that using the following approach.
-First create a new layers builder that derives from the default one, and remove the CellInputUILayer:

public class ReadOnlyUILayersBuilder : WorksheetUILayersBuilder
        {
            public override void BuildUILayers(UILayerStack<WorksheetUILayerBase> uiLayers)
            {
                base.BuildUILayers(uiLayers);
                uiLayers.Remove(WorksheetPredefinedUILayers.CellInput);
            }
        }

-In the constructor of your MainWindow, for example, replace the default builder with the new one:
this.radSpreadsheet.WorksheetUILayersBuilder = new ReadOnlyUILayersBuilder();

When the RadSpreadsheet is loaded you will not be able to edit the cells.

Please have in mind that this is only a work-around and genuine read-only functionality is still not available. All the best,
Andrew
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Biserka
Top achievements
Rank 1
answered on 03 Jul 2013, 02:24 PM
Hi,

this is a workaround for setting all cells to readonly. Is there a way of setting some of them to readonly, so that the rest would stay editable?
0
Andrew
Telerik team
answered on 08 Jul 2013, 12:56 PM
Hi Biserka,

The only way to set not all but some of the cells to read-only is to use protection on worksheet or workbook. We have added those features to our TODO list, but did not have the chance to implement them yet. We will do our best to include those in some of our next releases.

Regards,
Andrew
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Stephen
Top achievements
Rank 1
answered on 04 Mar 2014, 06:22 PM
Hi Andrew,
Do we have any upates on that feature request (enable SetIsLocked and Protect functions)? I am also pending for this option to disable a specific range of CellSelection.

Note: The Silverlight version #2013.3.1204.1050 (Runtime #v4.0.30319) does not have these features as to date.
0
Boryana
Telerik team
answered on 07 Mar 2014, 02:34 PM
Hello Stephen,

Thank you for writing.

I am glad to inform you that worksheet protection was introduced in Q1 2014. You will be able to see it in action in our SL Protection demo - http://demos.telerik.com/silverlight/#Spreadsheet/Protection.

I have logged disabling selection for specific ranges as a feature request. We will do our best to implement it in a future release.

Let me know if you have further questions. I will do my best to assist you.

Regards,
Boryana
Telerik

DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!

0
Marta
Top achievements
Rank 1
answered on 20 Mar 2015, 10:50 AM
Hi,

I am facing the following problem:
I have an excel file that I am importing to RadSpreadSheet. I want the file to be read-only. I am using the workseet protection introduced in Q1 2014. It works with a simple excel files but in the advanced excel file that I need to use (groupint etc) there are some raws that are not protected. It looks like the unprotected raws are random. 
The second solution that I used is the work-around posted here. This option also doesnt work well. When I press on the cell to edit it I get an exception that I cant handle in my code. Is there any other way to protect the sheet?


0
Anna
Telerik team
answered on 23 Mar 2015, 12:18 PM
Hi Marta,

Thank you for your interest in RadSpreadsheet.

At this point the best way to protect the sheet is through the protection feature. Would it be OK for you to send us the file where you've found the unprotected rows? This way we'll be able to investigate precisely what is going on. In order to send us a file, you'll need to open a support ticket, which you can do through your account.

I am looking forward to your reply.

Regards,
Anna
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Spreadsheet
Asked by
jafar
Top achievements
Rank 1
Answers by
Andrew
Telerik team
jafar
Top achievements
Rank 1
Biserka
Top achievements
Rank 1
Stephen
Top achievements
Rank 1
Boryana
Telerik team
Marta
Top achievements
Rank 1
Anna
Telerik team
Share this question
or