Making Cells / Formular readonly?

2 posts, 0 answers
  1. Rene
    Rene avatar
    11 posts
    Member since:
    Jan 2014

    Posted 08 Feb 2016 Link to this post


    i wonder if it is somehow possible to define cells to be read only including the formular. I also couldn't find a solution for hiding sheets when importing an excel file.

    Do you guys have any solution for that?


  2. Ivan Danchev
    Ivan Danchev avatar
    1617 posts

    Posted 11 Feb 2016 Link to this post

    Hello Rene,

    While the Spreadsheet does not have a method for making cells readonly you can disable a cell or range of cells through the SpreadsheetRange object's client-side API:
    var spreadsheet = $find("<%= RadSpreadsheet1.ClientID %>");
    var activeSheet = spreadsheet.get_activeSheet();
    var range = activeSheet.get_range("A1:B3");

    The user would not be able to modify the value of a cell disabled using the above method, however the value still can be used in functions and formulas.
    As for hiding sheets when importing from Excel, the Spreadsheet does not support such functionality. With regard to hiding specific information, once the control is loaded, it supports hiding sheet rows and columns which are accessed by their index.

    Ivan Danchev
    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
Back to Top