Aspose.Cells.GridWeb.Examples.CSharp.RowsAndColumns.MakeRowsColumnsReadOnly.btnMakeCellReadOnly_Click C# (CSharp) Метод

btnMakeCellReadOnly_Click() защищенный Метод

protected btnMakeCellReadOnly_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void
        protected void btnMakeCellReadOnly_Click(object sender, EventArgs e)
        {
            // ExStart:MakeCellReadOnly
            // Accessing the first worksheet that is currently active
            GridWorksheet sheet = GridWeb1.WorkSheets[GridWeb1.ActiveSheetIndex];

            // Set the 1st cell (A1) read only
            sheet.SetIsReadonly(sheet.Cells["A1"], true);
            // ExEnd:MakeCellReadOnly
        }
    }