AutoFill and Formulas in wpf GridControl, like in Excel
Hello,
I have just started using GridControl in a C# WPF application.
1) Is there a feature, like in Excel called AutoFill, that automatically populates cells with data (text, numbers, dates, formulas) by recognizing patterns from initial entries, using the small green square (fill handle) at the corner of a selected cell to copy content over the range of cells.
2) I set all cells to CellType = "FormulaCell". However, when I start typing a formula beginning with = and then click another cell to reference it, the focus switches to that cell instead of inserting the reference (for example, =A1).
Please help.
Attachment: Samples_871ea2ea.zip
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
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.
Hello Sreemon,
The idea behind the “add new line” feature and setting the title/
header
block rows as non‑editable
is as follows
- 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.
- 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.
-
Is there a way to get the index of the last created row, or do I need to keep track of it manually?
- The idea it not to keep unnecessary empty rows.
- How to enable auto-scrolling when dragging a cell down or to the right by the bottom-right corner (AutoFill)?
- How to preserve the cell’s original formatting when using AutoFill or Copy/Paste?
Hello Sreemon,
Attached please find the modified project and two screenshots.
Description of the problem:
- Using FreezePanes
- Run the application and maximize the main window.
- Select a cell. The cell border selection appears.
- Shrink the main window horizontally over the Freeze Panes area (covering the last frozen column)
- The cell selection disappears and cells can't be selected anymore.
- The same behavior can also be reproduced by setting
spreadSheetControl.DefaultColumnCount = 12(in this particular case).
spreadSheetControl.Workbook.ActiveSheet.Range[9, 13].FreezePanes();
var gridModel = spreadSheetControl.ActiveGrid;
gridModel.FrozenRows = 9;
gridModel.FrozenColumns = 13;
Attachment: freezeRev2_bcc1232f.zip
We have created a new forum for Spreadsheet related query. We request that you have a further follow-up on a below forum.
- 6 Replies
- 3 Participants
-
VA Vadim
- Dec 18, 2025 12:32 AM UTC
- Dec 23, 2025 05:23 AM UTC