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

Is it possible to hide 'Add New Sheet' button in Sheetselector?

1 Answer 167 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Ruslan
Top achievements
Rank 1
Ruslan asked on 16 Apr 2014, 06:37 AM
Hi,
1. Is it possible to hide 'Add New Sheet' button in the Sheetselector?
2. How to disable the dialog with 'The cell you are trying to editing is on a protected sheet. To make changes, unprotect the sheet' message?

1 Answer, 1 is accepted

Sort by
0
Boryana
Telerik team
answered on 17 Apr 2014, 12:54 PM
Hello Ruslan,

Thank you for contacting us.

Let me get straight to your questions: 

1. You can hide the Add Sheet button using the IsAddButtonVisible attached property:
RadSpreadsheetSheetSelector.SetIsAddButtonVisible(this.radSpreadsheet, false);

2. Currently, RadSpreadsheet does not provide control over the warnings and messages displayed to the user. For this reason we added a MessageShowing event to the RadSpreadsheet class that allows you to suppress and customize the dialog. For example, the following snippet will disable only protection-related messages:

private void RadSpreadsheet_MessageShowing(object sender, MessageShowingEventArgs e)
{
    string content = LocalizationManager.GetString("Spreadsheet_ProtectedWorksheet_Error");
 
    if (string.Equals(e.Content, content))
    {
        e.IsHandled = true;
    }
}

Please note that the MessageShowing event will be available in the LIB expected next week.

I hope you will find my answer helpful. Do not hesitate to write back if you have further questions.

Regards,
Boryana
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
Ruslan
Top achievements
Rank 1
Answers by
Boryana
Telerik team
Share this question
or