Articles in this section

How to disable fill and copy series in WPF Spreadsheet?

WPF Spreadsheet (SfSpreadsheet) has the built-in support to fill the values across the rows and columns by dragging the fill handle of the cell containing value or any formula within it. If you want to disable fill and copy series in Spreadsheet by setting AllowFillSeries property of FillSeriesController to false in WorkbookLoaded event.

//To disable the fillseries
spreadsheet.WorkbookLoaded += Spreadsheet_WorkbookLoaded;
 
private void Spreadsheet_WorkbookLoaded(object sender, Syncfusion.UI.Xaml.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 sheet at run time, you can set the AllowFillSeries property of FillSeriesController to false in WorksheetAdded event.

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

Below is the screen shot when AllowFillSeries is false.

Disable the copy and fill series in spreadsheet


Below is the screen shot 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)
Access denied
Access denied