Aspose.Cells.GridWeb.Examples.CSharp.Worksheets.ManageComments.btnRemoveComments_Click C# (CSharp) Метод

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

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

            // Accessing a specific cell that contains comment
            GridCell cell = sheet.Cells["A1"];

            // Removing comment from the specific cell
            sheet.Comments.RemoveAt(cell.Name);
            // ExEnd:RemoveComments
        }
    }