Aspose.Cells.GridWeb.Examples.CSharp.GridWebBasics.AddRemoveContextMenuItem.GridWeb1_CustomCommand C# (CSharp) Метод

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

protected GridWeb1_CustomCommand ( object sender, string command ) : void
sender object
command string
Результат void
        protected void GridWeb1_CustomCommand(object sender, string command)
        {
            if (command.Equals("MyContextMenuItemCommand") | command.Equals("MyNewContextMenuItemCommand"))
            {
                // Accessing the active sheet
                GridWorksheet sheet = GridWeb1.WorkSheets[GridWeb1.ActiveSheetIndex];

                // Putting value to "A1" cell
                sheet.Cells["A1"].PutValue("My Custom Context Menu Item command " + command + " is Clicked.");

                // Set first column width to make the text visible
                sheet.Cells.SetColumnWidth(0, 40);
            }
        }
    }