Articles in this section
Category / Section

How to disable fill and copy series in WinForms Spreadsheet?

2 mins read

WinForms Spreadsheet (SfSpreadsheet) has the built-in support for fill across the row or column cells by dragging the fill handle into the cell containing value or any formula within it. If you want to disable the fill and copy series in Spreadsheet, you can set the AllowFillSeries property of FillSeriesController to false in WorkbookLoaded event.

//To disable fill series
this.spreadsheet.WorkbookLoaded += Spreadsheet_WorkbookLoaded;
 
private void Spreadsheet_WorkbookLoaded(object sender, Syncfusion.Windows.Forms.Spreadsheet.Helpers.WorkbookLoadedEventArgs args)
{
    foreach(var sheet in args.GridCollection)
    {
        sheet.FillSeriesController.AllowFillSeries = false;
    }
}

If you want to disable the fill and copy series in newly added spreadsheet at runtime, you can set the AllowFillSeries property of FillSeriesController to false in WorksheetAdded event. 

this.spreadsheet.WorksheetAdded += Spreadsheet_WorksheetAdded;
 
private void Spreadsheet_WorksheetAdded(object sender, Syncfusion.Windows.Forms.Spreadsheet.Helpers.WorksheetAddedEventArgs args)
{
    spreadsheet.ActiveGrid.FillSeriesController.AllowFillSeries = false;
}

  Below is the screenshot when AllowFillSeries is false.


Disable the copy and fill series in spreadsheet


  Below is the screenshot when AllowFillSeries is true.


Enable the copy and fill series in spreadsheet


View sample in GitHub

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied