Articles in this section
Category / Section

How to disable fill and copy series in WPF Spreadsheet?

3 mins read

WPF Spreadsheet 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.

C#

//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.

C#

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

Sample: 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