Is there anyway to change the apperance of spreadsheet control

I am looking for a way to change the appearance of spreadsheet control. Trying to make it less look like excel. These are the changes I am specifically trying to achieve.

1. Hide the Column header ("A","B" etc..) and row number or atleast make their color to black so its not visible to user.
2. remove the "Add Sheet" option from control.

Can you please tell me how can I do that. 


 

1 Reply 1 reply marked as answer

AR Arulpriya Ramalingam Syncfusion Team November 4, 2020 06:57 PM UTC

Hi Ehsen,

Thank you for using Syncfusion products.

1. Hide the Column header ("A","B" etc..) and row number or atleast make their color to black so its not visible to user.
In order to remove the headers from the Spreadsheet, the SetRowColumnHeadersVisibility() method can be used. We already provided the details in our user guide and please make use of the below UG link for further reference.

UG link: https://help.syncfusion.com/windowsforms/spreadsheet/worksheet-management#headings
2. remove the "Add Sheet" option from control.
The AddSheet button could not be removed from the UI however, the action of adding sheets at run time can be restricted ba handling the WorkSheetAdding event. Please refer to the below event for further details.

Example code

//Event customization
private void Spreadsheet_WorkbookLoaded(object sender, Syncfusion.Windows.Forms.Spreadsheet.Helpers.WorkbookLoadedEventArgs args)
{
    spreadsheet.WorksheetAdding += Spreadsheet_WorksheetAdding;
}
private void Spreadsheet_WorksheetAdding(object sender, Syncfusion.Windows.Forms.Spreadsheet.Helpers.WorksheetAddingEventArgs args)
{
    args.Cancel = true;
}

Please get back to us, if you need any further assistance.

Regards,
Arulpriya


Marked as answer
Loader.
Up arrow icon