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
        }
    }