{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "spreadsheet-editor-freeze-pane",
  "framework": "aspnet-mvc",
  "type": "registry:component",
  "component": "Spreadsheet",
  "variant": "freeze-pane",
  "dependencies": [
    "Syncfusion.AspNetMvc.Spreadsheet"
  ],
  "description": "Spreadsheet editor demonstrating frozen rows and columns while scrolling through worksheet data.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/aspnet-mvc/llms.txt",
    "skillPack": "syncfusion/aspnetmvc-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/aspnet-mvc/spreadsheet-editor-freeze-pane.md"
  },
  "files": [
    {
      "target": "src/components/spreadsheet-editor-freeze-pane/SpreadsheetEditor.cshtml",
      "content": "@using Syncfusion.EJ2\n@using Syncfusion.EJ2.Spreadsheet\n\n@section ControlsSection{\n    <div class=\"control-section\">\n        @Html.EJS().Spreadsheet(\"spreadsheet\").OpenUrl(\"FreezePaneOpen\").SaveUrl(\"FreezePaneSave\").Created(\"createdHandler\").Sheets(sheet =>\n   {\n       sheet.Name(\"Gross Salary\").FrozenRows(2).FrozenColumns(2).SelectedRange(\"C1\").Ranges(ranges =>\n       {\n           ranges.DataSource((IEnumerable<object>)ViewData[\"freezePaneData\"]).StartCell(\"A2\").Add();\n       }).Rows(row =>{\n           row.Cells(cell => {\n               cell.Index(1).Value(\"Period\").Style(new SpreadsheetCellStyle { FontSize = \"12pt\", FontWeight = FontWeight.Bold, TextAlign = TextAlign.Center, VerticalAlign = VerticalAlign.Middle }).Add();\n               cell.Index(3).Value(\"Total Gross Salary\").Style(new SpreadsheetCellStyle { FontSize = \"12pt\", FontWeight = FontWeight.Bold, TextAlign = TextAlign.Center, VerticalAlign = VerticalAlign.Middle }).Add();\n           }).Add();\n           row.Cells(cell =>\n           {\n               cell.Index(2).Value(\"Basic Salary\").Add();\n               cell.Value(\"Revised Basic Salary\").Add();\n               cell.Value(\"DA\").Add();\n               cell.Value(\"Revised DA\").Add();\n               cell.Value(\"HRA\").Add();\n               cell.Value(\"Revised HRA\").Add();\n               cell.Value(\"Conveyance Allowance\").Add();\n               cell.Value(\"Revised Conveyance Allowance\").Add();\n               cell.Value(\"Medical Expenses\").Add();\n               cell.Value(\"Revised Medical Expenses\").Add();\n               cell.Value(\"Special Allowance\").Add();\n               cell.Value(\"Revised Spcial Allowance\").Add();\n               cell.Value(\"Total Gross Salary\").Add();\n               cell.Value(\"Revised Total Gross Salary\").Add();\n           }).Add();\n           row.Index(26).Cells(cell => {\n               cell.Index(13).Value(\"Total Amount\").Style(new SpreadsheetCellStyle { FontSize = \"12pt\", FontWeight = FontWeight.Bold, TextAlign = TextAlign.Center, VerticalAlign = VerticalAlign.Middle }).Add();\n               cell.Formula(\"=SUM(O4:O26)\").Style(new SpreadsheetCellStyle { FontSize = \"12pt\", FontWeight = FontWeight.Bold, TextAlign = TextAlign.Center, VerticalAlign = VerticalAlign.Middle }).Add();\n               cell.Formula(\"=SUM(P4:P26)\").Style(new SpreadsheetCellStyle { FontSize = \"12pt\", FontWeight = FontWeight.Bold, TextAlign = TextAlign.Center, VerticalAlign = VerticalAlign.Middle }).Add();\n           }).Add();\n       }).Columns(column => {\n           column.Width(80).Add();\n           column.Width(80).Add();\n           column.Width(100).Add();\n           column.Width(100).Add();\n           column.Width(100).Add();\n           column.Width(100).Add();\n           column.Width(100).Add();\n           column.Width(100).Add();\n           column.Width(100).Add();\n           column.Width(100).Add();\n           column.Width(100).Add();\n           column.Width(100).Add();\n           column.Width(80).Add();\n           column.Width(100).Add();\n           column.Width(100).Add();\n           column.Width(100).Add();\n       }).Add();\n   }).Render()\n    </div>\n}\n\n<script>\n    function createdHandler() {\n        this.wrap(\"C2:P2\");\n        this.merge('A1:B1');\n        this.merge('C1:P1');\n        this.cellFormat({ backgroundColor: '#4e4ee6', color: '#FFFFF4', fontSize: '12pt', fontWeight: 'bold', textAlign: 'center', verticalAlign: 'middle' }, 'A1:P2');\n        this.cellFormat({ backgroundColor: '#4e4ee6', color: '#FFFFF4' }, 'A3:B26');\n        this.numberFormat('$#,##0.00', 'C2:P26');\n        this.numberFormat('$#,##0.00', 'O27:P27');\n    }\n</script>\n\n@*custom code start*@\n<style>\n    .control-section {\n        height: 550px;\n    }\n    #sb-content .e-spreadsheet .e-tab .e-tab-text {\n        display: inherit;\n    }\n</style>\n"
    },
    {
      "target": "src/components/spreadsheet-editor-freeze-pane/SpreadsheetEditorController.cs",
      "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\nusing System.Web.Mvc;\nusing Syncfusion.EJ2.Spreadsheet;\n\nnamespace EJ2MVCSampleBrowser.Controllers.Spreadsheet\n{\n    public partial class SpreadsheetController : Controller\n    {\n        public ActionResult FreezePane()\n        {\n            List<object> data = new List<object>()\n            {\n                new { Month= \"January\",  Year= \"2019\",  BasicSalary= 15100,  RevisedBasicSalary= 15800,  DA= 2000,  RevisedDA= 2200, HRA= 5000,  RevisedHRA= 6500,  ConveyanceAllowance= 1500,  RevisedConveyanceAllowance= 1700, MedicalExpenses= 1250, RevisedMedicalExpenses= 1500, SpecialAllowance= 1000, RevisedSpecialAllowance= 1200, TotalGrossSalary= \"=SUM(C3,E3,G3,I3,K3,M3)\", RevisedTotalGrossSalary= \"=SUM(D3,F3,H3,J3,L3,N3)\", },\n                new { Month= \"February\",  Year= \"2019\",  BasicSalary= 15100,  RevisedBasicSalary= 15800,  DA= 2000,  RevisedDA= 2200, HRA= 5000,  RevisedHRA= 6500,  ConveyanceAllowance= 1500,  RevisedConveyanceAllowance= 1700, MedicalExpenses= 1250, RevisedMedicalExpenses= 1500, SpecialAllowance= 1000, RevisedSpecialAllowance= 1200, TotalGrossSalary= \"=SUM(C4,E4,G4,I4,K4,M4)\", RevisedTotalGrossSalary= \"=SUM(D4,F4,H4,J4,L4,N4)\", },\n                new { Month= \"March\",  Year= \"2019\",  BasicSalary= 15100,  RevisedBasicSalary= 15800,  DA= 2000,  RevisedDA= 2200, HRA= 5000,  RevisedHRA= 6500,  ConveyanceAllowance= 1500,  RevisedConveyanceAllowance= 1700, MedicalExpenses= 1250, RevisedMedicalExpenses= 1500, SpecialAllowance= 1000, RevisedSpecialAllowance= 1200, TotalGrossSalary= \"=SUM(C5,E5,G5,I5,K5,M5)\", RevisedTotalGrossSalary= \"=SUM(D5,F5,H5,J5,L5,N5)\", },\n           \n            };\n            ViewData[\"freezePaneData\"] = data;\n            return View(\"~/Views/Home/spreadsheet-editor/freeze-pane/SpreadsheetEditor.cshtml\");\n        }\n\n        public ActionResult FreezePaneOpen(OpenRequest openRequest)\n        {\n            return Content(Workbook.Open(openRequest));\n        }\n\n        public void FreezePaneSave(SaveSettings saveSettings)\n        {\n            if (saveSettings != null && saveSettings.JSONData != null)\n            {\n                Workbook.Save(saveSettings);\n            }\n        }\n    }\n}"
    }
  ]
}