Замораживание и размораживание панелей

Замораживание строк и столбцов

Чтобы заморозить определенное количество строк и столбцов:

  1. Добавьте элемент управления Aspose.Cells.GridWeb на веб-форму.
  2. Получите доступ к листу.
  3. Заморозите определенное количество строк и столбцов.
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Get user inputs for row, column, number of rows and number of columns
int row = Convert.ToInt16(txtRow.Text.Trim());
int column = Convert.ToInt16(txtColumn.Text.Trim());
int noOfRows = Convert.ToInt16(txtNoOfRows.Text.Trim());
int noOfColumns = Convert.ToInt16(txtNoOfColumns.Text.Trim());
// Accessing the reference of the worksheet that is currently active
GridWorksheet sheet = GridWeb1.WorkSheets[GridWeb1.ActiveSheetIndex];
// Freeze desired rows and columns
sheet.FreezePanes(row, column, noOfRows, noOfColumns);

Размораживание строк и столбцов

Чтобы разморозить строки и столбцы:

  1. Добавьте элемент управления Aspose.Cells.GridWeb на веб-форму.
  2. Получите доступ к листу.
  3. Разморозить строки и столбцы.
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Accessing the reference of the worksheet that is currently active
GridWorksheet sheet = GridWeb1.WorkSheets[GridWeb1.ActiveSheetIndex];
// Unfreezing rows and columns
sheet.UnFreezePanes();