protect cell or sheet in spreadsheet

10 posts, 0 answers
  1. jafar
    jafar avatar
    9 posts
    Member since:
    Feb 2013

    Posted 18 Mar 2013 Link to this post

    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
  2. Andrew
    Admin
    Andrew avatar
    140 posts

    Posted 20 Mar 2013 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. jafar
    jafar avatar
    9 posts
    Member since:
    Feb 2013

    Posted 25 Mar 2013 Link to this post

    Hello
    Do you have a solution for this problem?
    I need just to set spreadsheet control or cell to read only.
    Thanks

  5. Andrew
    Admin
    Andrew avatar
    140 posts

    Posted 26 Mar 2013 Link to this post

    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.

  6. Biserka
    Biserka avatar
    1 posts
    Member since:
    Jun 2013

    Posted 03 Jul 2013 Link to this post

    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?
  7. Andrew
    Admin
    Andrew avatar
    140 posts

    Posted 08 Jul 2013 Link to this post

    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 >>
  8. Stephen
    Stephen avatar
    1 posts
    Member since:
    Nov 2013

    Posted 04 Mar 2014 in reply to Andrew Link to this post

    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.
  9. Boryana
    Admin
    Boryana avatar
    330 posts

    Posted 07 Mar 2014 Link to this post

    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!

  10. Marta
    Marta avatar
    4 posts
    Member since:
    Mar 2015

    Posted 20 Mar 2015 in reply to Boryana Link to this post

    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?


  11. Anna
    Admin
    Anna avatar
    99 posts

    Posted 23 Mar 2015 Link to this post

    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.

     
Back to Top
UI for WPF is Visual Studio 2017 Ready