AutoFill and Formulas in wpf GridControl, like in Spreadsheet ~ Split from 197939

Hello Sweatha,

Thank you for your prompt response.

I’m currently evaluating the SfSpreadsheet control, as it has features we want to use in our grid.

However, I encountered an issue with the Freeze Rows feature. I modified your demo project, “FreezeRowColumnDemo.” Each time I change the column parameter in FreezePanes() on a button click, the column that was previously frozen disappears from the spreadsheet grid.

Another question: is there a way to make cells non-editable within a specific range of rows while leaving the rest of the cells unchanged (editable)? I want to protect the header rows from being edited.

I found a way to do this by locking cells on a protected sheet. However, a warning dialog appears when a locked cell is clicked, and I need a custom action to occur when the header cells are clicked.


Also, what is the best way to control the number of rows/columns displayed in the grid? I want to limit the number of columns, and the user should not be able to add new columns. The rows should be added by using "+Add New Row"

Thank you


Attachment: freezeRev1_af1b308a.zip

---------------------------------------------------------------------------------------------------------

Sreemon Premkumar Muthukrishnan Syncfusion Team

Hi Vadim,

 

We were able to replicate the reported issue with the frozen columns and also understand your requirements regarding limiting and restricting the addition of rows and columns, as well as setting the header row as non‑editable. We are currently analyzing your requirement on our side. We will need some time to validate it and will provide you with an update on or before December 24, 2026.

 

We appreciate your patience until then.

 

In the meantime, regarding your requirement that “Rows should be added using ‘+Add New Row’”, could you please provide more details on how you expect the new rows to be added?


Regards,

Sreemon Premkumar M.

---------------------------------------------------------------------------------------------------------

Vadim

Hello Sreemon,

The idea behind the “add new line” feature and setting the title/ header block  rows as non‑editable is as follows

  1. The sheet starts with a formatted title block that represents the table’s multi-line headers ( the rows in this block must be non-editable. ), followed by one empty row for data input.
  2. If the user presses the Down Arrow key with the cursor positioned on the last available row, and that row is not empty, a new empty row appears in the grid.
  3. Is there a way to get the index of the last created row, or do I need to keep track of it manually?
  4. The idea it not to keep unnecessary empty rows.

Also few questions about the AutoFill :
  1. How to enable auto-scrolling when dragging a cell down or to the right by the bottom-right corner (AutoFill)?
  2. How to preserve the cell’s original formatting when using AutoFill or Copy/Paste?

Thank you,
Vadim

VA

Vadim

Hello Sreemon,


Attached please find the modified project and two screenshots.


Description of the problem:

  1. Using  FreezePanes
  2.  spreadSheetControl.Workbook.ActiveSheet.Range[9, 13].FreezePanes();

     var gridModel = spreadSheetControl.ActiveGrid;

     gridModel.FrozenRows = 9;

     gridModel.FrozenColumns = 13;

  3. Run the application and maximize the main window.
  4. Select a cell. The cell border selection appears.
  5. Shrink the main window horizontally over the Freeze Panes area (covering the last frozen column)
  6. The cell selection disappears and cells can't be selected anymore.
  7. The same behavior can also be reproduced by setting spreadSheetControl.DefaultColumnCount = 12 (in this particular case).
Regards,
Vadim


Attachment: freezeRev2_bcc1232f.zip



6 Replies

RC Raj Clinton Gnanaprakasam Syncfusion Team December 24, 2025 01:51 PM UTC

Hi Vadim,

Please find the response to your queries below:

S.NO 
Query 
Response
1
When changing the frozen column parameter, the previously frozen column gets disappeared.
We have checked and confirmed the reported issue "Frozen columns disappeared when freezing rows and columns programmatically at runtime in the spreadsheet" as a defect. We have logged a bug, and We will fix this issue and include it in our upcoming NuGet release which is scheduled on 13 January 2026.
 
You can track the status of this report through the following feedback link,
 
 
Note: The provided feedback link is private, and you need to log in to view this feedback.
 
We will let you know once it is released. We appreciate your patience until then.
 
Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.
 
2
is there a way to make cells non-editable within a specific range of rows while leaving the rest of the cells unchanged (editable)?
You can disable editing for a specific range of rows by canceling the edit operation in the CurrentCellBeginEdit event, based on the respective row index. Please find the code snippet below.
 
 
Spreadsheet.ActiveGrid.CurrentCellBeginEdit += ActiveGrid_CurrentCellBeginEdit;
 
 
 
void ActiveGrid_CurrentCellBeginEdit(object sender, CurrentCellBeginEditEventArgs args)
{
    // Provide the index where the header cells are loaded. 
    // In this sample, the headers are in the 6th and 17th row.
    if (args.RowcolumnIndex.RowIndex == 6 || args.RowcolumnIndex.RowIndex == 17)
        args.Cancel = true;
}
3
Also, what is the best way to control the number of rows/columns displayed in the grid? I want to limit the number of columns
To limit the number of rows and columns, set the required row count using ActiveGrid.RowCount and the column count using ActiveGrid.ColumnCount inside the WorkbookLoaded event. Please find the code snippet below.
 
private void SpreadSheetControl_WorkbookLoaded(object sender, Syncfusion.UI.Xaml.Spreadsheet.Helpers.WorkbookLoadedEventArgs args)
{
    spreadSheetControl.ActiveGrid.ColumnCount = 50;
    spreadSheetControl.ActiveGrid.RowCount = 50;
}
4
the user should not be able to add new columns.
You can disable adding new columns when clicking the right arrow button on the horizontal scroll bar by setting the AllowExtendRowColumnCount API to false. Please find the code snippet below.
 
private void SpreadSheetControl_WorkbookLoaded(object sender, Syncfusion.UI.Xaml.Spreadsheet.Helpers.WorkbookLoadedEventArgs args)
{
    spreadSheetControl.AllowExtendRowColumnCount = false;
}
5
The rows should be added by using "+Add New Row"
We would like to inform you that the Spreadsheet control does not include an AddNewRow button. However, you can add a new row at the bottom of the spreadsheet by using ActiveSheet.InsertRow and Model.InsertRows, passing the total row count. Please find the code snippet below.
 
private void Button_Click_1(object sender, RoutedEventArgs e)
{
    spreadSheetControl.ActiveSheet.InsertRow(spreadSheetControl.ActiveGrid.RowCount, 1);
spreadSheetControl.ActiveGrid.Model.InsertRows(spreadSheetControl.ActiveGrid.RowCount, 1);
}
Please refer to the user guide below for more details.
 
 
Note: We have attached the modified sample for your reference.
 
6.
How to enable auto-scrolling when dragging a cell down or to the right by the bottom-right corner (AutoFill)?
 
 
 
By default, auto-scrolling is enabled when performing the fill/copy series operation in SfSpreadsheet. When you drag the fill handle (the small square at the bottom-right corner of a selected cell) and reach the edge of the visible area, the spreadsheet automatically scrolls, allowing you to extend the selection beyond the current viewport.



7.
How to preserve the cell’s original formatting when using AutoFill or Copy/Paste?
 
 
We are currently analyzing the reported scenario. We need some time to validate the scenario. We will provide further updates on or before December 29, 2025.


Regards,
Raj Clinton G

Attachment: ModifiedSample_a949d812.zip


RC Raj Clinton Gnanaprakasam Syncfusion Team December 29, 2025 01:45 PM UTC

Hi Vadim,

Query
Response
How to preserve the cell’s original formatting when using AutoFill or Copy/Paste?
 
 
SfSpreadsheet preserves cell formatting when pasting values only by using the DefaultPasteOption property or, in the UI, by selecting the Values option from the paste options popup that appears during a paste operation. Please find the code snippet below.

spreadSheetControl.CopyPaste.DefaultPasteOption = PasteOptions.Value;
We have also attached video and modified sample for your reference.
Additionally, SfSpreadsheet supports preserving cell formatting when performing Fill or Copy Series operations by using the Fill Without Formatting option in the ShowFillOptions popup.

However, we have identified an issue with the Fill Without Formatting option for Fill Series. We have logged a bug for this issue “Fill Without Formatting option does not work properly when using Fill Series in SfSpreadsheet.” We will fix this issue and include the resolution in our upcoming NuGet release, scheduled for 20 January 2026.
You can track the status of this report through the following feedback link,
 
 
Note: The provided feedback link is private, and you need to log in to view this feedback.
 
We will let you know once it is released. We appreciate your patience until then.
 
Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.

Regards,
Raj Clinton G

Attachment: FillSeries_8bbb4460.zip


VA Vadim January 6, 2026 02:33 PM UTC

Thank you for your help and support Raj



RC Raj Clinton Gnanaprakasam Syncfusion Team January 13, 2026 07:03 AM UTC

Hi Vadim,

We sincerely apologize for the inconvenience. Unfortunately, the fix for the issue related to "Frozen columns disappeared when freezing rows and columns programmatically at runtime in the spreadsheet" was not included in today’s NuGet package release as promised.
 
While the issue has been addressed and a fix implemented, we encountered some issues during the testing phase, which prevented its inclusion in the release. We will fix these issues and include the fix in our upcoming weekly NuGet release, scheduled for 20 January 2026.

Regards,
Raj Clinton G


RC Raj Clinton Gnanaprakasam Syncfusion Team January 20, 2026 07:40 AM UTC

Hi Vadim,

Bug Reported
Response
Frozen columns disappeared when freezing rows and columns programmatically at runtime in the spreadsheet
We are glad to announce that our weekly patch release (32.1.24) is rolled out. We have included the fix for the reported “Frozen columns disappeared when freezing rows and columns programmatically at runtime in the spreadsheet” issue in this release. So, kindly upgrade your package version to the latest to avail of these changes (32.1.24).
 
 
 
Issue Root Cause:
When performing programmatic freezing of panes, the frozen columns disappeared because the first visible column/row was not correctly reset during the unfreeze process. To resolve this issue, we updated the condition to ensure the first visible column/row is properly reset during the programmatic unfreeze operation. This ensures that programmatic freezing works as expected.
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you require any further assistance.
 
Additionally, we would like to inform you that you need to perform the unfreeze operation before performing programmatic freezing, as per the UI logic. Please find the code snippet below.
 
spreadSheetControl.Workbook.ActiveSheet.RemovePanes();
spreadSheetControl.ActiveGrid.FrozenRows = 1;
spreadSheetControl.ActiveGrid.FrozenColumns = 1;

We have attached the modified sample for your reference.

Could you please review it and confirm whether the issue is resolved on your end?
Fill Without Formatting option does not work properly when using Fill Series in SfSpreadsheet
We sincerely apologize for the inconvenience. Unfortunately, the fix for the issue related to "Fill Without Formatting option does not work properly when using Fill Series in SfSpreadsheet." was not included in today’s NuGet package release as promised.
 
While fixing the issue, we encountered internal stability issues that required additional attention. We are actively working to resolve these issues and will include the changes in our upcoming weekly NuGet release, scheduled for 27 January 2026.
 
We will notify you once it is released. We appreciate your patience during this time.

Regards,
Raj Clinton G

Attachment: ModifiedSample_2d0ba3a9.zip


RC Raj Clinton Gnanaprakasam Syncfusion Team January 27, 2026 06:06 AM UTC

Hi Vadim,

We are glad to announce that our weekly patch release (32.1.25) is rolled out. We have included the fix for the reported “Fill Without Formatting option does not work properly when using Fill Series in SfSpreadsheet” issue in this release. So, kindly upgrade your package version to the latest to avail of these changes (32.1.25).
 
 
 
Issue Root Cause:
The issue occurred due to a missing condition to handle the Fill Series scenario during the FillWithoutFormatting operation, which caused the Copy Series logic to be executed. This has been resolved by updating the logic to correctly identify and execute the appropriate Fill/Copy Series behavior for the FillWithoutFormatting case.
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you require any further assistance.

Regards,
Raj Clinton G

Loader.
Up arrow icon